Houdini expression $Pi question in Learning Materials

   1016   4   2
User Avatar
Member
7 posts
Joined: Oct. 2023
Offline
Hi all! I am new to houdini and started to watch this video by Robert Magee: https://vimeo.com/739705211 [vimeo.com]

On 11:11 there is an expression (i attached screenshot also).

Can someone please to explain how this expression called in trigonometry and math. Wanna know more about it (how calculate rotation and other staff)

I thought it arc lenght, but it seems like not.

Thanks in advance!

Attachments:
ExpressionQuestion1.png (1.6 MB)

User Avatar
Member
401 posts
Joined: Nov. 2016
Offline
In the expression, the (2*$PI*1.1) part probably calculates the circumference [en.wikipedia.org] of the ball. The circumference formula is 2πr, where r is the radius, so we can assume the ball has a radius of 1.1.

When the ball moves in x (the ch("../../soccerball_ctrl/tx") part of the formula links to its x translate value) the length of its circumference, the two values cancel each other in the formula, and you're left with -360 as a rotate x value, a full rotation.

So basically the expression makes it appear as if the ball is rolling when you're translating it in the x axis, by linking its x rotation to its x translation in the correct ratio.
Edited by Tanto - Oct. 31, 2023 16:41:02
User Avatar
Member
7 posts
Joined: Oct. 2023
Offline
Tanto
In the expression, the (2*$PI*1.1) part probably calculates the circumference of the ball. The circumference formula is 2πr, where r is the radius, so we can assume the ball has a radius of 1.1.

When the ball moves in x (the ch("../../soccerball_ctrl/tx") part of the formula links to its x translate value) the length of its circumference, the two values cancel each other in the formula, and you're left with -360 as a rotate x value, a full rotation.

So basically the expression makes it appear as if the ball is rolling when you're translating it in the x axis, by linking its x rotation to its x translation in the correct ratio.

Thank you for your answer! But we contained expression in transform node using Rotate Z axis, while using translate X.

Can I somehow see how riatet Z axis of transform node is changing while you move translate x axis? I tried using geometry spreadsheet,but not helpful.
Edited by BFunnyKatrine - Nov. 1, 2023 12:04:08
User Avatar
Member
685 posts
Joined: Feb. 2017
Offline
if you click on the word Rotate that is labeling your parameter field it should toggle between the expression and the value.
Cheers
CYTE
User Avatar
Member
7 posts
Joined: Oct. 2023
Offline
CYTE
if you click on the word Rotate that is labeling your parameter field it should toggle between the expression and the value.
Cheers
CYTE

Thank you! So simple click and so helpful Now I can see what degree value is changing by the expression.
  • Quick Links