|
Boost : |
Subject: Re: [boost] [geometry] area, length, centroid, behavior
From: Simonson, Lucanus J (lucanus.j.simonson_at_[hidden])
Date: 2009-03-05 12:03:43
> Simonson, Lucanus J wrote:
>> I have implemented 100% numerically robust integer polygon clipping
>> operations
> > (AND, OR, NOT, XOR) based upon my N-layer scanline algorithm that
> produces all > geometries with unique sets of overlapping input
> layers.
>
Mika Heiskanen wrote:
> Do you have any plans to also add a robust buffering function?
Do you mean polygon fill? Buffering is a pretty general term and I'm not sure what you mean, but I'm guessing you mean writing the geometry to an image buffer.
I have the ability to tile output polygons as trapezoids (may degenerate to rectangles) by slicing along the scanline orientation. These tiles are trivially split (if necessary) into triangles and fed into any graphics API that renders triangles. There will be an example in the documentation of how to convert a black and white GIL image into polygons with edge detection, smooth away pixel scale features, perform operations on the resulting polygons then put the result back into a GIL image by use of a algorithm that performs trapezoid filling of enclosed pixel points in a 2d array.
The trapezoid approach introducees numerical artifacts and extra verticies, which would be of no consequence when converting to an image if the coordinate data type were on the order of the pixel size or smaller.
If you meant something else please elaborate so that I can answer properly.
Thanks,
Luke
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk