Question: age Exercise 1: We consider a simple polygon P, which is defined by an ordered list of points. As an example one could consider

age Exercise 1: We consider a simple polygon P, which is defined by an ordered list of points. As an example

age Exercise 1: We consider a simple polygon P, which is defined by an ordered list of points. As an example one could consider the following list of points ((0,0), (1,0), (1, 1), (0, 1)), which represents the unit square. a) Implement an O(n) algorithm for the calculation of the area enclosed by the polygon P. b1) Implement an algorithm that computes the convex hull of a polygon P! b2) Implement an algorithm in order to check whether a given polygon P is convex! Use an efficient algorithm. c) Implement an algorithm to check, whether a given line intersects a given polygon P. Hint: Use Greens theorem for a)! Test your code for at least two different examples and choose them wisely (such that the tests are meaningful). I) Describe an algorithm that computes the area of a general polygon (with holes and self-intersections)!

Step by Step Solution

3.46 Rating (149 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!