Assignment: Convex hull in 3D

Implement a brute-force algorithm for finding the convex hull of a set of points in 3D.

Representing the hull

For this assignment you do not need to store the topology of the hull (i.e. vertices, edges and faces do not need to store their neighbors). The hull is basically a list of faces. This should make the algorithm significantly simpler.

Dealing with degeneracies

If there exist sets of 4 or more points that are co-planar, it is possible that faces in the hull are not triangular.

It would be nice to triangulate the faces that are not triangular, so that the hull is a list of triangles.

When finding the faces by brute force, handling these larger faces will take some thinking. Say the hull contains a face with vertices v1,v2,v3,v4. All these points are co-planar. We check v1v2v3 and output it as a face. We check v1v2v4 and putput it as a face. We check v2v3v4 and output it as a face. ALso v1v3v4 and output is as a face. Therefore we got a problem. The first stage of this project is to be able to see the hull, so we'll ignore the issue of larger faces and the overlappig triangles. Eventually we'll need to solve it though.

Base code

Base code is provided here. You will want to check out graphics1 first to understand some OpenGL basics.

The code should compile as is, but it does not do anything besides the interface. You need to add a function that computes the hull, and a function that renders the faces of the hull.

Test cases: As with the previous assignment, please provide at least one interesting test case (configuration of points) on which to compute the hull. Every team, please email your special test_cases to the whole class, so that everyone can include everyone's test cases in their code, and check that their CH code works well in all cases.

Extra features

Some ideas:

Submitting your work

Make a folder called hull3d in your svn folder on microwave. I will have access to this svn, so no need to submit anything --- just make sure everything is checked in.

Enjoy!