Average points on primitives.

   2256   3   1
User Avatar
Member
17 posts
Joined: March 2017
Offline
I have six primitives (curves) with 10 points. I'd like to average the points of all the primitives, essentially trying to create an averaged curve of all the curves and I'm not sure if I'm approaching it right.

For example, I want to get each point index of each curve and average it. Say, point 0 of each primitive, average them, then move on to point 1 of the primitives, and average them, and so on.

Is there a better way to average all of the curves? I'm a Houdini noob and I'm struggling. can someone help? I'm sorry I can't provie the file since it's part of a bigger project.

Thank you.
User Avatar
Member
1391 posts
Joined: Dec. 2010
Offline
Hi

What do you mean of average ?!

Average for what ? Position ?
And per what ? Next point ?

However you can do any specific operation per each point via point wrangle sop.

E.g about averaging position, you can get position of next point with point() function and compute average of that position by current point position which is @P.
https://www.youtube.com/c/sadjadrabiee [www.youtube.com]
Rabiee.Sadjad@Gmail.Com
User Avatar
Member
28 posts
Joined: Nov. 2013
Offline
You can try it this way.
Image Not Found

Attachments:
AverageCurve.hip (136.7 KB)

User Avatar
Member
17 posts
Joined: March 2017
Offline
Thank you for replying and pardon my bad explanation on my post. arjanM thank you very much for the example file, that was exactly what I was looking for!
I had a similar VEX code but I made the mistake of running two for-loops over Primitives.
  • Quick Links