InterviewSolution
| 1. |
How Do I Compute The Triangulation Of The Interior Of A Polygon? |
|
Answer» For this, one should use one of the CONSTRAINED TRIANGULATION classes: Constrained Triangulation 2, Constrained Delaunay Triangulation 2 or Constrained Triangulation PLUS 2. The edges of the polygon should be input as constraints to the triangulation. The constructed triangulation will be a triangulation of the WHOLE convex hull, but including as edges the edges of the polygon which are marked as constrained edges. From there it is EASY to output the faces inside (resp. outside) the polygon or to mark these faces as such. For this, one should use one of the constrained triangulation classes: Constrained Triangulation 2, Constrained Delaunay Triangulation 2 or Constrained Triangulation plus 2. The edges of the polygon should be input as constraints to the triangulation. The constructed triangulation will be a triangulation of the whole convex hull, but including as edges the edges of the polygon which are marked as constrained edges. From there it is easy to output the faces inside (resp. outside) the polygon or to mark these faces as such. |
|