Find the contour of adjacent polygons

I am looking for a way to find the contour of two adjacent polygons.

Polygons are defined by a list of points ordered by occurrence in a polygon. In my case, there are no overlapping polygons, there are no gaps between the polygons, and there are no "holes" polygons.

I want to calculate the scheme of two polygons without any "holes". These pictures show the expected results.

enter image description here

, , , ( , ..). ( > 20 000). ?

+4
1

, ""

.

  • .

  • , . ( , , ( ), - ( )), .

  • . , , e e . - . . ASCII .

    U----V----W
    |    |    |
    |    |    |
    Z----Y----X
    

    {U->Z, Z->Y, Y->X, X->W, W->V, V->U}. W->V U->V. W->V V->U. {U->V, V->Y, Y->Z, Z->U} {V->W, W->X, X->Y, Y->V}.

  • , . {U->V, V->Y, Y->Z, Z->U}

    /_UVY - 180 + /_VYZ - 180 + /_YZU - 180 + /_ZUV - 180
        = 4 * (90 - 180) = -360.
    

    /_UZY - 180 + /_ZYX - 180 + /_YXW - 180 + /_XWV - 180 + /_WVU - 180 + /_VUZ - 180
        = 4 * (270 - 180) + 2 * (180 - 180) = 360.
    
0

All Articles