Boost logo

Geometry :

Subject: [ggl] Re: Problems with the difference between two polygons
From: Simonson, Lucanus J (lucanus.j.simonson)
Date: 2011-08-04 08:15:32


angusj wrote:
> Enrico Leoni wrote:
>>TR Gtl l 005 ms/l 0001885 PS 03353 VS 00049544 PR 05671 VR 00048887
>>TR Ggl l 005 ms/l 0000732 PS 03353 VS 00049544 PR 05672 VR 00048889
>>TR Clipper l 005 ms/l 0002869 PS 03353 VS 00049544 PR 05671 VR 00043215
>>TR Gtl l 005 ms/l 0001915 PS 03560 VS 00051344 PR 05886 VR 00049914
>>TR Ggl l 005 ms/l 0000781 PS 03560 VS 00051344 PR 05887 VR 00049916
>>TR Clipper l 005 ms/l 0003021 PS 03560 VS 00051344 PR 05886 VR 00044027
>>TR Gtl l 005 ms/l 0001942 PS 03757 VS 00053078 PR 06108 VR 00050830
>>TR Ggl l 005 ms/l 0000848 PS 03757 VS 00053078 PR 06109 VR 00050832
>>TR Clipper l 005 ms/l 0003192 PS 03757 VS 00053078 PR 06108 VR 00044718
>
> Firstly, to introduce myself as a newcomer to the list, I'm the
> author of Clipper.
>
> It's interesting to see that Clipper returns a smaller numbers of
> vertices in these tests.
> It's possible this is due to errors in Clipper's code but, given that
> Clipper spends very considerable 'post processing' time checking for
> polygons sharing common edges and merging them, I suspect that
> Clipper may in fact return 'simpler' solutions. Enrico, Is there any
> way to assess the correctness of (and hence the simplicity of) these
> results? Also, depending on the degree of precision you're using in
> these tests, I suspect that Clipper could be optimised by setting the
> UseFullCoordinateRange property to false.
>
> Also Enrico, when you update your comparisons, I think it'd be
> helpful to include both GGL timings (ie with and without
> self-intersection testing). Otherwise, it would be interesting to
> include a new test that evaluated this feature.
>
> Finally, thanks again for the very interesting comparisons.
>
> Angus

Cool, we're all here then.

Gtl outputs a list vertex equal to the first vertex. GTL also retains colinear vertices. If you discard colinear vertices or don't output the redundant last vertex then your vertex count would come out lower than mine. I'm not sure if GGL outputs colinear vertices, but if not that could explain the two vertex difference between Barend's implementation and my own.

Regards,
Luke


Geometry list run by mateusz at loskot.net