davideberly / GeometricTools

A collection of source code for computing in the fields of mathematics, geometry, graphics, image analysis and physics.
Boost Software License 1.0
1.08k stars 202 forks source link

Visible vertex algorithm appears to be incorrect. #78

Closed davideberly closed 7 months ago

davideberly commented 7 months ago

Reported by @elalish

"In the process I found a small error in your paper. It turns out Mark Spoor was wrong and your original minimize-the-angle-approach is correct. Here is a counter-example polygon for finding a mutually visible vertex."

Emmett, in you message at your github repository, I cannot determine what polygons you are referring to. You have TEST(Polygon, Eberly) with polygons listed as indices into a pool of 11 vertices. Where do I find the vertices in your polygon_test.cpp for my specific test?

Thanks for any help.

davideberly commented 7 months ago

@elalish

Oh, those are the vertex positions, not indices. Not enough coffee today (or too much coffee). Sorry to bother you.

davideberly commented 7 months ago

Yes, I verified that your example shows Spoor's approach does not work. Thanks. Yet one more thing to fix...

elalish commented 7 months ago

No problem, glad you could repro.

elalish commented 7 months ago

Did you take a look at my extension of your algorithm for ε-valid (slightly overlapping) polygons? I'd be interested in your opinion of it.

davideberly commented 7 months ago

I thought I had actually changed my posted code to use Spoor's approach, but turns out it was in my sandbox that I am using for fixing the bridge ordering problem mentioned in Issue #56. The only thing that needs to be modified is the PDF itself where the reference to Spoor's approach should be removed. I have not yet posted the PDF because I am rewriting it based on Issue #56.

@elalish I have not looked at your extension. I have made a note to look at it when I have some spare time.