Polygon CCW winding check request
Markus Nullmeier
mnullmei at ari.uni-heidelberg.de
Tue Jun 19 23:27:47 CEST 2018
Hello list,
On 18/06/18 09:44, Francois-Xavier PINEAU wrote:
>
> I get a result which seems correct (see below).
>
> I suspect that the problem you mention (on the need for rational
> arithmetic) as no consequence in practice: the areas between two very
> close edges (which are supposed to overlap) is going to be very very
> close from 0 (I may be missing something, let's discuss this off list if
> you want).
I am sorry, it was I who missed something here (more than something,
actually).
Now I hopefully do understand that self-intersecting polygons should be
well defined using the definition given in this thread. I simply
overlooked the fact that test paths, when crossing collinear parts
of multiple edges, will switch between the "inside" and "outside" states
as many times as there are edges incident -- at what mathematically is
just a single point.
Nevertheless, I still feel that self-intersecting polygons are not
"nice", however small the probability of false in/out tests on points
near collinear edges (see the quoted text above) might be when using
floating-point arithmetic.
> It seems that there is a large consensus to support only
> non-self-intersecting polygons, so I am not going to push any further.
With the hint that Serge Monkewitz gave, it seems clear that self-
intersecting polygons are essentially as expressive as the data type
that I proposed. I continue to think of the latter as a viable
alternative.
Best regards,
Markus Nullmeier
More information about the dal
mailing list