Grasshopper

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!

Views: 3326

Replies to This Discussion

Is it like this? The center point is the center of all in terms of location. But Im not very sure if it's same if u need to involve calculation of material density or etc. 

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. 

Merging mass properties is a difficult process. Rhino has ways to compute the centre of mass of multiple objects, but I did not expose this in Grasshopper. It could easily be accessed thriugh a C# component though. I'm not quite sure how to deal with different densities though.
Hi David,
Luckily for my current task I don't need material densities. All the objects are made up of multiple materials so I've been given weight estimates for each object.
That being said, I think i found a solution that works for my current task:
Using the maths components I recreated the formula for center of mass and it worked!
Attachments:

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

Attachments:

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service