PDA

View Full Version : Centroid for polygonal mesh


IlaySHP
08-05-2010, 08:12 AM
Hello
I stack with calculation of centroid for polygonal mesh. Can somebody help me?
I tried to put 1 tp into centre of object(anim.).
http://img268.imageshack.us/img268/5610/90010201.png (http://img268.imageshack.us/i/90010201.png/)

mark render
08-05-2010, 10:05 AM
you donīt need the boundig-box node to get the barycenter of a mesh. just center the axis (menu/structure/axis center/axis center) of your mesh (doesnīt matter what shape), this will be your center, which then can be used for positioning your particle.
hope this helps.

JDP
08-05-2010, 11:08 AM
If you don't want to move your axis you can loop through all points with an iterator adding their positions together, then divide by the number of points. You can also use the bounding box points.

HTH

semerkhet22
08-05-2010, 07:29 PM
take a look here at http://vimeo.com/12810513 he uses a super trick to find the centroid or center of mass using the tracer.

CGTalk Moderation
08-05-2010, 07:29 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.