mass point of 2D polygone
can someone tell me where I can find formules to calculate the mass point coordinates of a 2D polygone.
I think I can make them myself but if someone else has already done it I don''t want to do the work just over :-)
ok that''s the formule for a polygone wiht 3 points.
But my problem is the calculation of the center of mass for a polygone with more points and I don''t think that
x= (x1+x2+x3+x4+x5+....+xn)/n is the right formule
But my problem is the calculation of the center of mass for a polygone with more points and I don''t think that
x= (x1+x2+x3+x4+x5+....+xn)/n is the right formule
in physics u would have each point ortho to earth surface and draw a line from the point to earth, for all points the center of mass would be the intersection of all the lines.
hope this helps.
hope this helps.
no that formule can''t be right
ex:
0----0 0----0
| | | |
| | | |
0 | | |
| | | |
0----0 0----0
0 ==> point of polygone
have the same center of mass but with x = x1+x2+...+xn/n you get two different coordinates
ex:
0----0 0----0
| | | |
| | | |
0 | | |
| | | |
0----0 0----0
0 ==> point of polygone
have the same center of mass but with x = x1+x2+...+xn/n you get two different coordinates
no that formule can''t be right
ex:
0----0 0----0
| | | |
| | | |
0 | | |
| | | |
0----0 0----0
0 ==> point of polygone
have the same center of mass but with x = x1+x2+...+xn/n you get two different coordinates
ex:
0----0 0----0
| | | |
| | | |
0 | | |
| | | |
0----0 0----0
0 ==> point of polygone
have the same center of mass but with x = x1+x2+...+xn/n you get two different coordinates
Break your polygon up into triangles. Compute the centre of mass of each triangle and it's area. Divide each triangles area by the total area of the polygon (sum of all triangle areas) and use this as the triangles weight. Take the average of each triangles centre of mass multiplied by its weight and that is the centre of mass of the polygon.
(I don't mean weight as in mass x acceleration, but rather as in 'a weighted average')
Timkin
[edited by - Timkin on March 20, 2002 9:06:00 PM]
(I don't mean weight as in mass x acceleration, but rather as in 'a weighted average')
Timkin
[edited by - Timkin on March 20, 2002 9:06:00 PM]
sounds to be the right solution and even very simple to program.
I''m just wondering why I didn''t found it myself :-) it''s very simple and logic. thanks
I''m just wondering why I didn''t found it myself :-) it''s very simple and logic. thanks
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement