Moment of Inertia
-
- Posts: 2
- Joined: Mon May 31, 2010 1:58 am
- Contact:
Moment of Inertia
Hi all, quick question - I am trying to get the moment of inertia for a body that has 3 polygon shapes added to it. Is it as simple as adding the moments of inertia for the 3 shapes?
-
- Posts: 90
- Joined: Tue Aug 04, 2009 9:53 am
- Contact:
Re: Moment of Inertia
Unfortunately its not quite as simple.... see post here:
http://www.slembcke.net/forums/viewtopi ... 977&hilit=
I also implemented a function to combine shape/body pairs into one shared body (somewhat similar) in objective-c in the SpaceManager project. One caveat being that the function uses the OLD moment of inertia to calculate the new.....
Anyway here's a direct link to the source; you'll be looking at the combineShapes and offsetShape functions (beware the large commented-out block in combineShapes, its hard to see that in a browser):
http://code.google.com/p/chipmunk-space ... Manager.mm
http://www.slembcke.net/forums/viewtopi ... 977&hilit=
I also implemented a function to combine shape/body pairs into one shared body (somewhat similar) in objective-c in the SpaceManager project. One caveat being that the function uses the OLD moment of inertia to calculate the new.....
Anyway here's a direct link to the source; you'll be looking at the combineShapes and offsetShape functions (beware the large commented-out block in combineShapes, its hard to see that in a browser):
http://code.google.com/p/chipmunk-space ... Manager.mm
-
- Posts: 2
- Joined: Mon May 31, 2010 1:58 am
- Contact:
Re: Moment of Inertia
Ok, that doesnt seem too bad. It certainly beats trying to decipher a wall of equations on a physics forum. Thanks for your help.
Who is online
Users browsing this forum: No registered users and 10 guests