Polygon hit test
The equations of simgeometry.kernels.polygon_hits, declared on the code that implements them and checked by the tests.
object_hit_times
functionsourceWhere along each step from (x0, y0) to (x1, y1) the marker enters the object.
- crossing
- inside
- hit time
- Assumes
- the object is the union of its polygons, negated if inverted; the end is tested by the even-odd rule over the vertices, without the bounding box of
Polygon.contains_points - edges parallel to the step () are never crossings; a crossing at is not a hit, at it is
- the same arithmetic as
object_hit_timeof the Pyccel modulepolygon_hit_pycceland its CUDA formpolygon_hit.cuh
- the object is the union of its polygons, negated if inverted; the end is tested by the even-odd rule over the vertices, without the bounding box of