Re: polygon intersection



"mike" <kostal.michal@xxxxxxxxx> wrote in message
news:1130321135.712885.254470@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

> It is possible to do the operations so they return the no-hole polygons?

If a polygon has a hole, you can make it appear topologically as a
simple polygon by locating a vertex A on the outer polygon and a
vertex B on the inner polygon, where the line segment connecting
A and B is not intersected by the original polygon edges (except
at the end points A and B). Then you modify the original polygon
to have two new edges, one from A to B and one from B to A.

To illustrate, consider the polygon with hole. The outer polygon
is a square with vertices (0,0), (3,0), (3,3), and (0,3), in that
order--counterclockwise so polygon interior is to your left as
you follow the vertices. The inner polygon is a square with
vertices (1,1), (1,2), (2,2), (2,1), in that order--clockwise so
polygon interior is to your left as you follow the vertices. The
line segment from (0,0) to (1,1) is not intersected by the original
polygon edges (except at the end points). The "simple" polygon
you create has ordered vertices: (0,0), (3,0), (3,3), (0,3), (0,0),
(1,1), (1,2), (2,2), (2,1), (1,1), (0,0) [last point mentioned to
make it clear you have "closed" the polygon, but probably not
duplicated in the actual application].

For such polygons, the question is whether the polygon Boolean
package you are using will support these in further queries.

--
Dave Eberly
http://www.geometrictools.com


.



Relevant Pages

  • Re: Fill polygon with hole
    ... scanline which is covered by the hole and simply do not rasterize this ... because generaly for each scanline you will process all holes. ... will be faster, but you need some division of the polygon, e.g. ... nonconvex polygons and polygons with holes, so if you are using opengl ...
    (comp.graphics.algorithms)
  • Polygon Fill Mode..?
    ... I am having trouble drawing a polygon with a hole in the centre in my WinCE ... in the Pocket PC app produces a 'fill' where the hole should be. ...
    (microsoft.public.windowsce.app.development)
  • Re: complex polygon -> simple polygon.
    ... A polygon with multiple hole can be converted a simple polygon by ... defining bridges from ...
    (comp.graphics.algorithms)
  • complex polygon -> simple polygon.
    ... A polygon with multiple hole can be converted a simple polygon by ... defining bridges from ...
    (comp.graphics.algorithms)
  • Re: how to increase a polygon
    ... i have a polygon defined by n segment, and i want to create a new ... polygone wich surround the initial polygon with a fixed ... Then X and Y are the vertices of the desired outer polygon. ... If, for example, the original polygon were arranged ...
    (comp.soft-sys.matlab)