I just had a major disappointment.
Heres what i had in mind :
Mesh consisting of triangles can be verified to form a "solid" polyhedra ( concave, no gaps no holes ) if
every edge is shared by exactly two triangles
none of triangles are intersecting
Now for physics calculations ( mass , centre of mass ) i thought that im going to decompose such meshes into tetrahedrae, and calculate each one of them separately, then just take a sum of them. After couple of hours searching for algorithms on tetrahedralization ( basically triangularization in 3d ) i ran across this page
http://www.cs.mcgill.ca/~kitching/cs507/intro.html
I''ll need to find some other method of finding mass of arbitrary polyhedrae. Its basically integrating over a volume, the math involved gives me creeps already.
Any pointers ?
Tetrahedralization and a major bummer
Started by no way, Sep 27 2001 01:07 PM
5 replies to this topic
#2 Members  Reputation: 148
Posted 27 September 2001  08:45 PM
If your polyhedron is convex, you can choose a point in the middle. Then the polyhedron is made up of several pyramids  one for each face. If you first break the faces into triangles to start with, you have (irregular) tetrahedra.
Then volume = Area * height / 6 (measure height perpendicular to plane of face)
CoM is on the line between the middle of the triangle, a quarter of the way from the base to the point. That''s unless you''re playing with variation in density.
I guess these were the things you had worked out already.
This won''t always work if it''s concave, however. They may need to be specified as a number of polyhedra joined together.
Then volume = Area * height / 6 (measure height perpendicular to plane of face)
CoM is on the line between the middle of the triangle, a quarter of the way from the base to the point. That''s unless you''re playing with variation in density.
I guess these were the things you had worked out already.
This won''t always work if it''s concave, however. They may need to be specified as a number of polyhedra joined together.
#3 Moderators  Reputation: 1373
Posted 28 September 2001  04:44 AM
Minor terminology correction: the singular of polyhedra is polyhedron not polyhedrae (according to my dictionary, which I checked!)
Your approach to sum the properties of individual tetrahedrons isn''t quite correct. For mass it will work, but for centerofmass and inertias you''d have to then treat each individual polyhedron as a new point object, located at its local center of mass and carrying inertia properties. Then integrate over the point objects to calculate the global center of mass and inertias using the parallel axis theorem. This is not difficult, just more work than a simple summation.
Try this paper:
Brian Mirtich, "Fast and Accurate Computation of Polyhedral Mass Properties," journal of graphics tools, volume 1, number 2, 1996,
available in postscript form here:
http://www.cs.berkeley.edu/~mirtich/publications.html
And the accompanying (public domain!) source code:
http://www.acm.org/jgt/papers/Mirtich96/source.tar
That may do the trick! This code should give you the mass *and* inertias of arbitrary polyhedra, and I don''t believe you''ll even need to split it into individual polyhedrons!
Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.
Your approach to sum the properties of individual tetrahedrons isn''t quite correct. For mass it will work, but for centerofmass and inertias you''d have to then treat each individual polyhedron as a new point object, located at its local center of mass and carrying inertia properties. Then integrate over the point objects to calculate the global center of mass and inertias using the parallel axis theorem. This is not difficult, just more work than a simple summation.
Try this paper:
Brian Mirtich, "Fast and Accurate Computation of Polyhedral Mass Properties," journal of graphics tools, volume 1, number 2, 1996,
available in postscript form here:
http://www.cs.berkeley.edu/~mirtich/publications.html
And the accompanying (public domain!) source code:
http://www.acm.org/jgt/papers/Mirtich96/source.tar
That may do the trick! This code should give you the mass *and* inertias of arbitrary polyhedra, and I don''t believe you''ll even need to split it into individual polyhedrons!
Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.
#4 Members  Reputation: 122
Posted 28 September 2001  07:34 AM
great thanks guys.
[If your polyhedron is convex, you can ]
yeah thats the problem, they arent convex, but your idea with choosing the point in the middle is quite good. It wont work in this case though. Basically what i have is bunch of construction parts ( like lego or something ) that can be fitted together for modeling more complex machinery ( submarine fighter ships, primarily )
[For mass it will work, but for centerofmass and inertias ]
For center of mass, its weighted average , is it not ? eg. cm_x = sum( cm_1_x * mass_1 , cm_2_x * mass_2 etc ) where cm_n and mass_n are center of mass and mass of each separate tetrahedron ?
For inertia i was simply planning to use inertia tensor calculated on bounding box of the whole model. Might not be accurate but works , at least for starters
[Brian Mirtich, "Fast and Accurate Computation of Polyhedral Mass Properties,"]
yeah i found this one too and tested the code, it works quite well. But im unable to read the paper itself, PStill wont convert it to PDF properly, and i have no other means of reading postsript files under Win98 Id like to understand the concept they are using, instead of just taking the code.
Edited by  no way on September 28, 2001 2:35:22 PM
Edited by  no way on September 28, 2001 2:36:20 PM
[If your polyhedron is convex, you can ]
yeah thats the problem, they arent convex, but your idea with choosing the point in the middle is quite good. It wont work in this case though. Basically what i have is bunch of construction parts ( like lego or something ) that can be fitted together for modeling more complex machinery ( submarine fighter ships, primarily )
[For mass it will work, but for centerofmass and inertias ]
For center of mass, its weighted average , is it not ? eg. cm_x = sum( cm_1_x * mass_1 , cm_2_x * mass_2 etc ) where cm_n and mass_n are center of mass and mass of each separate tetrahedron ?
For inertia i was simply planning to use inertia tensor calculated on bounding box of the whole model. Might not be accurate but works , at least for starters
[Brian Mirtich, "Fast and Accurate Computation of Polyhedral Mass Properties,"]
yeah i found this one too and tested the code, it works quite well. But im unable to read the paper itself, PStill wont convert it to PDF properly, and i have no other means of reading postsript files under Win98 Id like to understand the concept they are using, instead of just taking the code.
Edited by  no way on September 28, 2001 2:35:22 PM
Edited by  no way on September 28, 2001 2:36:20 PM
#5 Moderators  Reputation: 1373
Posted 28 September 2001  10:01 AM
For center of mass, take your sum and divide by total mass and your golden:
Yes, just that one extra step. Inertias are a bit different, since the shift to global center of mass depends on the square of distance from the object center of mass.
Of course your approach to compute inertias from the bounding box will work. I would recommend that you use an oriented bounding box if you can, one that best fits the *shape* of the object(s). Since your objects are legolike, you shouldn''t have any problem!
Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.

Yes, just that one extra step. Inertias are a bit different, since the shift to global center of mass depends on the square of distance from the object center of mass.
Of course your approach to compute inertias from the bounding box will work. I would recommend that you use an oriented bounding box if you can, one that best fits the *shape* of the object(s). Since your objects are legolike, you shouldn''t have any problem!
Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.
#6 Members  Reputation: 122
Posted 09 October 2001  05:36 PM
http://amp.ece.cmu.edu/Publication/Cha/icip01_Cha.pdf
Thats really what i was looking for. Good and easytounderstand explanations inside.
Thats really what i was looking for. Good and easytounderstand explanations inside.