- #1
Physt
- 49
- 1
I'm trying to find a reasonably fast method for testing whether or not a point (x,y euclidean coordinate system) lies inside a (preferably convex, concave or complex - though different methods for each would be OK) compound polygon with edges consisting of line segments, arcs and/or elliptical arcs (elliptical arcs may be rotated in addition to having a start and end angle). I've already written the algorithms for edge and volumetric intersections of Points, Lines, Rays, LineSegments, Arcs, EllipticalArcs, Circles, Ellipses, Rectangle, Polygons and every combination thereof (also edge-based intersections of CompoundPolygons) - so have plenty of algorithms to call from, however I would prefer something a bit cleaner than testing the number of hits along rays cast from the test point to all surrounding points if that can be avoided. Does anyone know of a better solution to this problem?