Python, distance between two points.
5705 5 0- aeaeaeae
- Member
- 125 posts
- Joined: Aug. 2010
- Online
- mtucker
- Staff
- 4419 posts
- Joined: July 2005
- Offline
One of the great things about using Python within Houdini is that you don't need to rely on just functionality built into Houdini. You can use any Python library you want: numpy, scipy, I'm sure there are others. Here is the first hit on googling “python distance between two points in 3d”: http://stackoverflow.com/questions/1401712/how-can-the-euclidean-distance-be-calculated-with-numpy [stackoverflow.com]
There is also an example in the Houdini docs on using numpy within Houdini (it's a COP example, but combined with the link above it should get you where you want to go): http://www.sidefx.com/docs/houdini/hom/pythoncop [sidefx.com]
Hope that helps.
There is also an example in the Houdini docs on using numpy within Houdini (it's a COP example, but combined with the link above it should get you where you want to go): http://www.sidefx.com/docs/houdini/hom/pythoncop [sidefx.com]
Hope that helps.
- animatrix_
- Member
- 4458 posts
- Joined: Feb. 2012
- Offline
numpy is a very handy library. Hope SESI will include more PIL, scipy, etc in H16.
HOM also have this function as hou.Vector3.distanceTo()
HOM also have this function as hou.Vector3.distanceTo()
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]
youtube.com/@pragmaticvfx | patreon.com/animatrix | animatrix2k7.gumroad.com
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]
youtube.com/@pragmaticvfx | patreon.com/animatrix | animatrix2k7.gumroad.com
- old_school
- Staff
- 2540 posts
- Joined: July 2005
- Offline
- aeaeaeae
- Member
- 125 posts
- Joined: Aug. 2010
- Online
- animatrix_
- Member
- 4458 posts
- Joined: Feb. 2012
- Offline
jeff
Submit an RFE for this.
This is now RFE ID# 76914.
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]
youtube.com/@pragmaticvfx | patreon.com/animatrix | animatrix2k7.gumroad.com
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]
youtube.com/@pragmaticvfx | patreon.com/animatrix | animatrix2k7.gumroad.com
-
- Quick Links