Boost logo

Boost :

Subject: Re: [boost] Formal Review: Boost.Polygon starts today August 24, 2009
From: Andreas Fabri (andreas.fabri_at_[hidden])
Date: 2009-08-25 16:45:33


Hello,

When I compute union or intersection of two rectangles rotated by 45 degree
that form an X, I don't necessarily get a 45 degree polygon, namely when
the intersection point is not an integer.

For example when one polygon has an edge 0,0 -- 10,10
        and the other polygon has an edge -1,10 -- 9,9

then they intersect mathematically at 4.5,4.5
but as you snap to an integer, you get for example 5,5

Now -1,10 -- 5,5 is no longer a 45 degree edge.

Isn't the fact that the set of 45 degree polygons is not closed
under Boolean operations with snap rounding bothersome (even in practice).

Best regards,

andreas fabri


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk