Advanced Search

Browse by Discipline

Scientific Societies

E-print Alerts

Add E-prints

E-print Network

  Advanced Search  

CS 5050 -Program #6 -30 points Geometric Algorithms

Summary: CS 5050 - Program #6 - 30 points
Geometric Algorithms
Gift Wrapping
GiftWrap.zip contains code to randomly create points on a graph and display a simple
polygon from those points. (This is already done for you)
From your output screen, the user should be able to select viewing options:
1. Points only: The anchor point labeled in black. All other points labeled in blue;
2. Simple Polygon: A simple polygon connecting the vertices colored in green.
3. Convex Hull. One convex hull.
4. Onion view: A series of convex hulls colored alternately in red or blue.
Create Simple Polygon (This part is already done for you. Study the code
to make sure you know what was done.)
Hint: To create a simple polygon, you need the points ordered.
Part 1 Create Convex Hull
Implement the Gift Wrapping method (section 12.5.4) for determining a convex hull.
Generate the code to display the convex hull.
Part 2 Create "onion" and test growth
An onion of a set of points is a series of convex hulls formed by finding a regular convex
hull, throwing away the points involved, and finding the next convex hull. This is
repeated until no more convex hulls are possible. The hypothesis is that the number of


Source: Allan, Vicki H. - Department of Computer Science, Utah State University


Collections: Computer Technologies and Information Sciences