Grasshopper

algorithmic modeling for Rhino

Hi, I am trying to find the centroid of a set of points, which are stored in one single point parameter.
So if I wanted to find the centroid of the group of points, I need to first add the components of points together and divide by the total number of points -->
{(X1+X2+X3+X4+X5)/5, (Y1+Y2+YE+Y4+Y5)/5, (Z1+Z2+Z3+Z4+Z5)/5}
Since the points are grouped into one single point parameter, and I am able to separate the x, y, and z components into 3 groups using "point decompose", but the question is, how do I add the x components together, then y components then z components?
Is there a way to do so? or is there another way to find the centroid of a group of points?
Thanks so much.

Yan

Views: 1384

Replies to This Discussion

The Mass Addition component will add up all your values in one go an then the divide component will accept a point as an input in version 0.7

Thank you so much, it helps a lot!

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service