[Sidefx-houdini-list] center of mass?

Louis Dunlevy louisdunlevy at gmail.com
Sun Feb 1 05:55:01 EST 2009


Eetu Martola wrote:
>  > Tom Nixon wrote:
>  >> Is there a quick and dirty way to calculate the center of mass of 
> geometry?
>  >>
> Louis Dunlevy wrote:
>   
>> A super duper cheapo way would be to use the attribute promote sop.
>> Stick position in the colour and then promote the colour to a detail
>> attribute using the avarage method..
>>
>>     
>
> The average of point positions is not necessarily very close to center
> of mass. think of a large cube connected to a small geosphere, average P
> would be a lot closer to the sphere.
>
> Here's a quickly knitted vop sop doing it via a volume;
> http://eetu.iki.fi/hou/center_of_gravity.hip
>
> The idea is to take a volume representation of the object, and
> take the average of the voxel positions, weighted with voxel opacity.
>
> Of course there are probably 5 more elegant ways to do it, but anyway.. :)
>
> eetu.
>
>   
Very nice.. ;)




More information about the Sidefx-houdini-list mailing list