Assignment 3: Finding segment intersections with a sweep line algorithm

Implement the sweep line algorithm for finding the intersections of a set of orthogonal line segments in 2D and animate the algorithm.

Start code is provided here. You will notice that the main file viewpoints.cpp is now in cpp and uses vectors. This is the one assignment where I wolud suggest that you use cpp, because it gives you balanced binary search trees. If you decide to stick to C, you'll need to find a free implementation of balanced binary search trees (like red-black trees or AVL trees).

You are encouraged to work with a partner and use the svn folder that DJ created for each group. If you would like to change partners, just come talk to me or send me an email, and we'll create new svn folders for you.

How to turn in:

If you find that you are debugging a lot, that's normal. Always code assuming you'll have to debug. Think and structure your code incrementally so that it is easy to debug it. Test one piece before you move on to the next one. Keep in mind that pointer errors do not always manifest, and soemtimes they manifest in different ways on different computers.

And finally, if your code has bugs, you need to make it to the study group and talk to Max (the TA). He may not be able to tell you exactly what is wrong, but going over your code with someone else may show you what's wrong. I've been in many situatiosn where someone would walk me through their code, only to find out the problem as they were explaining how it works.

Enjoy!


Last modified: Tue Feb 17 12:25:02 EST 2015