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 2007 Programming Assignment #1 Due: 11:59pm, Friday January 26th 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

This note was uploaded on 08/06/2008 for the course CS 130B taught by Professor Suri during the Winter '08 term at UCSB.

Ask a homework question - tutors are online