Home Assignments Quizes

Project 1: Intersections

Due Date: Tue, Apr 15th

In computer graphics (including games), an important problem is to discover if two objects are intersecting. For performance reasons, we often perform two gross estimates between objects to determine if they intersect before testing whether the small parts of the objects intersect.

For example, consider a scenario where a hand is used to pick a flower. Clearly, the flower has many parts (petals, leaves, stem, etc), as does the hand (fingers, thumb, palm). By performing a rough estimate, we can keep from having to test each individual part of the objects.

Goals of the Project

The primary goals of the project are to:

What to Do

You will need to build at least one class to solve this project:

Object2D has the following methods: In addition, you will need to determine the running time of each algorithm. How long does it take, if one object has n vertices and the other object has m vertices to run create a bounding box, create a bounding sphere, and test if two objects intersect through either method? You must include the running time in comments at the start of each method.

Turn-in

You will need to use subversion with your group or solo (remember, groups can be up to 3 people). We will simply check-out your repository at the end of the day that the project is due, so check-in your project frequently and of course when you're done.

Grading

Your project will be graded on the correctness of your implementation and your understanding of its performance. In particular:

Note that we will test your project with a variety of objects ranging in sizes (ie, vertices), so it is in your best interest to test your project. Our test program will consist of a class with a main method that will create your object based on our test files.

Extra Credit

For extra credit, extend the project to 3 dimensions instead of only two. Note that objects will have to have 3-dimensional points representing the vertices instead of only two. Clearly this means creating a class such as Object3D with appropriately named methods and with additional dimensions.