Hi all! I am new to Houdini and started to watch "Getting Started" section. There is a video with Robert Magee and he shows expression to rolling a ball (11:11 in timeline of the video): https://vimeo.com/739705211 [vimeo.com]
Can someone please explain this part of the video, what is this expression? I thought it's arc length, but can't understand. And could you tell me where I can read about such expressions to better understand that. Thank you!
Language of Houdini expression question
1549 2 0- BFunnyKatrine
- Member
- 7 posts
- Joined: Oct. 2023
- Offline
- RudiNieuwenhuis
- Member
- 193 posts
- Joined: April 2009
- Offline
Even though I haven't seen the tutorial you are referring to, the expression that is used there is this:
ch("../../soccerball_crtl/tx") is a reference to the x position of the soccerball ctrl object.
I'm assuming that the radius of the ball is 1.1 and now to get the circumference of the ball, you have to use some math: 2 times the radius times the number PI (3.14159 etc), here represented by $PI.
So to calculate the rotation the ball needs to have to travel the distance it did (tx), you divide this distance by the circumference of the ball and multiply that by 360 to get degrees instead of number of rotations.
I hope this makes it clear(er).
ch("../../soccerball_crtl/tx") is a reference to the x position of the soccerball ctrl object.
I'm assuming that the radius of the ball is 1.1 and now to get the circumference of the ball, you have to use some math: 2 times the radius times the number PI (3.14159 etc), here represented by $PI.
So to calculate the rotation the ball needs to have to travel the distance it did (tx), you divide this distance by the circumference of the ball and multiply that by 360 to get degrees instead of number of rotations.
I hope this makes it clear(er).
- Mike_A
- Member
- 281 posts
- Joined: Aug. 2018
- Offline
A little way down this page, you'll see a section on Expressions > Parameter expressions. That might be helpful to you:
https://www.sidefx.com/docs/houdini/network/index.html [www.sidefx.com]
https://www.sidefx.com/docs/houdini/network/index.html [www.sidefx.com]
-
- Quick Links