Hi,

Assume we have two non-intersection polygons P1 = p1(x1,y1), p2(x2,y2),..., pN(xN,yN) P2 = p1(x1,y1), p2(x2,y2),..., pM(xM,yM)
where "Pi" is the polygon constructed with the ordered 2D points
"pi(xi,yi)", ie. vertices.
They could be convex or concave.

Following are two simple example polygons P1 and P2, with 4 and 6 vertices respectively. P1 : ==p1(x1,y1) O----------O p2(x2,y2) \

P2 : ==p1(x1,y1) O----------O p2(x2,y2) \ \ \ \ \ O p3(x3,y3) \ / \ O p4(x4,y4) \ | p6(x6,y6) O-------O p5(x5,y5)

Question: ======Is there a public algorithm, and/or C/C++ source code that can test the following;

Regards,

Albert

Assume we have two non-intersection polygons P1 = p1(x1,y1), p2(x2,y2),..., pN(xN,yN) P2 = p1(x1,y1), p2(x2,y2),..., pM(xM,yM)

Following are two simple example polygons P1 and P2, with 4 and 6 vertices respectively. P1 : ==p1(x1,y1) O----------O p2(x2,y2) \

*/ \ /*p1(x4,y4) O-------O p3(x3,y3)P2 : ==p1(x1,y1) O----------O p2(x2,y2) \ \ \ \ \ O p3(x3,y3) \ / \ O p4(x4,y4) \ | p6(x6,y6) O-------O p5(x5,y5)

Question: ======Is there a public algorithm, and/or C/C++ source code that can test the following;

*** If P1 and P2 intersect bool IsInterect(P1, P2); ***If P1 covered by P2 (all vertices and edges of P1 are located in P2) bool IsCovered(P1,P2);*** Total area of P1 float AreaOf(P1); ***Area of intersection P1 and p2 float AreaOfIntersection(P1,P2);*** Bounding box of P1 B1= BoundingBox(P1); (where B1 is a rectangle with 4 vertices) ***Bounding Circle of P1 C1 = BoundingCircleOf(P1); (where C1 defined by center coordiante and radius)Regards,

Albert