in reply to polygon buffering algorithms
And a buffer for a point would be nothing but a circle.Yes, but that's not a polygon. If you take a line segment, and you take the set of points that at distance d, you get two half circles joined by two line segments - not a polygon either.
Anyway, the problem shouldn't be too hard. Just walk along the original polygon, and create the new 'polygon' piece by piece. For each line segment, it's easy to find the corresponding line segment. Consecutive line segments are joined by arcs, whose origin lies on the vertex of the original polygon. For convex polygons, this is all you need to do. For concave polygon, you might get self-intersections this way. But they are reasonably easy to fix by maintaining a stack of 'polygon' pieces (line segments and arcs), and either deleting the top piece(s), or intersecting with it.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: polygon buffering algorithms
by punkish (Priest) on Feb 09, 2005 at 17:02 UTC | |
by Anonymous Monk on Feb 09, 2005 at 18:17 UTC |