Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

College Algebra With Modeling And Visualization

Authors: Gary Rockswold

6th Edition

0134418042, 978-0134418049

More Books

Students also viewed these Programming questions

Question

understand possible effects of ethnicity;

Answered: 1 week ago

Question

What is information systems analysis and design?

Answered: 1 week ago