algorithmic modeling for Rhino
I'm a grasshopper newbie looking to create a definition that will help me find the center of mass/center of gravity of a group of objects.
I have a scene of a room that includes ceiling, walls, floor, objects etc and I know the weights of each of these items.
This is how I think things should go: I would find the Volume Centroid of each of these objects and then assign weights to these Centroid points in grasshopper. Then I could use the Maths functions or Expression Editor to do the maths to find the center of mass for all the objects (using a formula similar to here). Is that right?
If so, I'm a bit baffled about the best way to do it in GH. I'm not sure whether I need to do calculations for x,y,z separately or whether I can do it all in one hit.
Any help would be appreciated. Once complete I'd be happy to share the definition for anyone to use as it would be a pretty useful tool!
Tags:
Hi yehezkielwm - Thanks for your reply!
Your definition would be ok if all the objects were the same weight. But lets say the object on the bottom left was 4 times heavier than the other objects. Then the center of mass will be much closer to that object.
That's what I'm trying to achieve.
https://www.youtube.com/watch?v=E1OACDnfY00
I see, looking at this video, I think what u want to achieve can be done in grasshopper through some vector multiplication etc. I would do it smtime later if u are not rushing it.
As promised, I'm sharing my Center of Gravity / Center of Mass definition.
It uses the simple maths formula of xc = m1x1+m2x2 / m1+m2
My definition includes 21 bodies, but you can delete as needed. I'm sure there's a simpler way to do this, but I needed to make it graphically easy for me to organise my data.
A
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by