Skip to content
Prev 11563 / 398502 Next

inout() in splancs working properly?

Rainer:
On Sat, 2 Jun 2001, Rainer Hurling wrote:

            
Yes and no. Computational geometry is a black art, and point-in-polygon
algorithms usually return the answer to whether the point is inside the
polygon or not (inside meaning inside the boundary). Some algorithms will
also tell you whether the point is on the (vanishingly thin) boundary
itself.

In your trial case, the vertices of the convex hull are both in the set of
points being tested and are actual boundary vertices, a very untypical
situation in empirical settings. If you "jittered" them so that they
didn't coincide exactly in their binary representation, the algorithm
would answer happily either yes or no - as it is, it says that boundary
points may be either in or not, depending (somewhat) on where your vertex
is around the boundary.

There is no general acceptance for points on boundaries being either
inside or outside, but in the next splancs release, the documentation will
be changed to reflect this issue, and I may try some alternative
algorithms to give three replies, and the user the choice of including
points on boundaries.

Hope this helps,

Roger