Sideof
The sideof function can be used to efficiently query the side of multiple points with respect to a given geometry or mesh.
Meshes.SideType — TypeIntersectionTypeThe different types of sides that a point may lie in relation to a boundary geometry or mesh. Type SideType in a Julia session to see the full list.
Meshes.sideof — Methodsideof(point, line)Determines on which side the point is in relation to the line. Possible results are LEFT, RIGHT or ON the line.
Notes
Assumes the orientation of Segment(line(0), line(1)).
Meshes.sideof — Methodsideof(point, ring)Determines on which side the point is in relation to the ring. Possible results are IN, OUT or ON the ring.
References
Meshes.sideof — Methodsideof(point, mesh)Determines on which side the point is in relation to the surface mesh. Possible results are IN or OUT the mesh.
References
- Jacobson et al. 2013. Robust inside-outside segmentation using generalized winding numbers
sideof(Point(0, 0), Line((1, 0), (1, 1)))LEFT::SideType = 3points = [Point(0, 0), Point(0.2, 0.2), Point(2, 1)]
polygon = Triangle((0, 0), (1, 0), (0, 1))
sideof(points, boundary(polygon))3-element Vector{SideType}:
ON::SideType = 2
IN::SideType = 0
OUT::SideType = 1