Hi List,Hallo Malte,
this one goes out to the math experts. How does one compute the area ( I hope it is the correct Term for flaecheninhalt in german) of a polygon with n sides.
(That would get me started.)
I want to extract all lines of 2 polygons by analysing their points, evaluate the area of each of them with some magic formula I don�t know ;-) and to figure out the area of the smallest polygon surrounding both of them.
wenn sich das Polygon nicht schneidet, geht es folgenderma�en: Es wird in Dreiecke zerlegt (man nimmt ein Polygonpunkt und verbindet ihn mit allen anderen); angenommen, die Koordinaten der 3 Eckpunkte sind (ax,ay), (bx,by) und (cx,cy) dann gilt f�r den Fl�cheninhalt: F = [ax*(by - cy) + bx*(cy - ay) + cx*(ay - by)]/2.
Diese Berechnung mu� nun f�r alle entstandenen Dreiecke durchgef�hrt und die Ergebnisse addiert werden.
In English:
If the polygon does not cross itself, the following method helps: the polygon has to be divided into triangulars (choose one point of the polygon and connect it with all the others); supposed, the coordinates of the three triangular points are (ax,ay), (bx,by) und (cx,cy), then the area F will be calculated with [ax*(by - cy) + bx*(cy - ay) + cx*(ay - by)]/2.
This has to be done for all the triangulars and the areas have be added and give the total area.
( I know, bad English from "old Europe")
Gru� Gernot
_______________________________________________ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
.
_______________________________________________ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
