Introduction
I have simple polylines as sequences of points. I need a triangulation with a configurable width. The goal is to get a 2D 'band' from the input polyline without self-intersections.
Description:
Input is a 2D point sequence {P1, ..., Pn} (Polyline) and a target width of the triangulated band. Output is the triangulation without self intersection:
In the current implementation I move the segments formed by {P1, .., Pn} in both perpendicular directions. The outline points to be triangulated are calculated by intersection of the translated segments (red dots in the image above).
The problem with this approach is that in sharp angles the resulting intersection points generate self-intersecting triangles:
Question
Is there a robust algorithm to triangulate a band from a polyline without generating self-intersections?
References:
- this approach seems to be similar but also does not solve the self intersection problem
- Clipper2 has an InflatePath method that does the offset but I don't know how to triangulate the resulting path
- An approach would be to just triangulate the outline points with Delaunay but I don't know how to restrict the result to triangles inside the 'Band'
- A very nice explanation of Constrained Delaunay Triangulation