Question: Triangulating non-self-intersecting 2D Polygons a) Provide an algorithm to test if a polygon P1,P2,,..,Pn with vertices in counter-clockwise order is convex? b) Provide an algorithm
Triangulating non-self-intersecting 2D Polygons
a) Provide an algorithm to test if a polygon P1,P2,,..,Pn with vertices in counter-clockwise order is convex?
b) Provide an algorithm to triangulate a convex polygon. The algorithm outputs n-2 triangles (such as P1,P2,P3 , P2,P4,P7 etc.) What is its time complexity of the algorithm?
c) Will the algorithm above work on concave polygons. If yes, prove it; If not, provide a counterexample and provide an algorithm that will work on concave polygons. What is the complexity of this algorithm?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
