prog1 - list of m x and y coordinates of points on the...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Computer Science 130B Winter 2012 Programming Assignment #1 Due: 4pm, January 27, Friday Implement a divide-and-conquer algorithm for ±nding the convex hull of a set of 2D points. Your program should take inputs of the following format: n x 1 y 1 x 2 y 2 · · · x n y n where n is the number of input points, followed by the x and y coordinates of the n points. Your program should output the convex hull in the following format: m x 1 y 1 x 2 y 2 · · · x m y m where m is the number of points forming the convex hull. It should be followed by an ordered
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: list of m x and y coordinates of points on the convex hull. When connecting these m points sequentially, we should trace out the convex hull. The start vertex should be the one of the largest y coordinate, and the traversal order should be clockwise (or roughly from 12 oclock back to 12 oclock, clockwise). Input will be supplied on stdin and output should be to stdout ....
View Full Document

Ask a homework question - tutors are online