pinning and averaging curve points

   4399   10   1
User Avatar
Member
15 posts
Joined: July 2010
Offline
Hello! I'm hoping someone will nudge me in the right direction on this little challenge I've set for myself.

In a nutshell, I want to set up a NURBS curve such that if I move either end point of the curve, each interior point will maintain a position that's the average of its neighboring points' positions (so point 4 would always be positioned between point 3 and point 5, point 3 would stay between point 2 and point 4, etc.).

I've set this up in Maya using expressions but am wondering how to do it in Houdini using operators. FWIW, I'd rather not use a spring if possible as I'd rather do it with a little math.

Also, what do I have to do to make a point on the curve follow something like a null or a sphere?

Any pointers would be appreciated!
Phil
User Avatar
Member
15 posts
Joined: July 2010
Offline
No one has any suggestions on how to do this?
User Avatar
Member
45 posts
Joined: June 2009
Offline
Hi,

do you need to move interior points or is the line always straight ?
User Avatar
Member
15 posts
Joined: July 2010
Offline
john_z
Hi,

do you need to move interior points or is the line always straight ?

Hi John. The interior points would be moved because I want their positions to be an average of their neighboring points' positions. This would result in the line always being straight, though.

Hope that makes it clearer!
Thanks!
Phil
User Avatar
Member
45 posts
Joined: June 2009
Offline
something like this ?

Attachments:
curve_pts.hipnc (61.4 KB)

User Avatar
Member
15 posts
Joined: July 2010
Offline
Brilliant! That's exactly what I was after! I appreciate your putting it together, very helpful and instructive. Seems so much easier/cleaner to do than all the expressions I had to write in Maya.

Cheers!
Phil
User Avatar
Member
7733 posts
Joined: July 2005
Offline
To do that, you need connectivity information. So I would just create a VOP SOP network and use the Get Neighbours (and friends) VOPs to help with this.
User Avatar
Member
15 posts
Joined: July 2010
Offline
edward
To do that, you need connectivity information. So I would just create a VOP SOP network and use the Get Neighbours (and friends) VOPs to help with this.
Thanks Edward, I'll look into that as well - I've been focusing on trying to get a handle on SOPs but sounds like I need to move VOPs up on my list!
User Avatar
Member
15 posts
Joined: July 2010
Offline
john_z
something like this ?
Hey John, hate to bother you but any ideas on how I'd connect the end point of the curve to a specific point on a circle rather than a sphere? I tried isolating the curve point by making it into a group but this doesn't produce very good results. Hope you won't mind my asking!
User Avatar
Member
45 posts
Joined: June 2009
Offline
Hi,

you could use the Carve Sop to extract a point on a nurbs circle
based on a parametric coordinate.

Take a look at the Misc tab of the circle object in the attached file.

Happy to help if I can

Attachments:
curve_pts_v2.hipnc (266.9 KB)

User Avatar
Member
15 posts
Joined: July 2010
Offline
john_z
Hi,

you could use the Carve Sop to extract a point on a nurbs circle
based on a parametric coordinate.
Great idea, I wouldn't have thought of that!
Thank you again, John!
  • Quick Links