next up previous contents
Next: Analysis Up: Implementation Previous: Non-Degenarcy Assumption

Java and Animation

Java is selected as the implementation language because of its good support for user interface and animation. Among the several reasons of algorithm animation, first comes increasing the understandability of an algorithm. Visualization often helps both the implementor of the algorithm and the students who are learning an algorithm to understand the details of the it. As discussed in [8], animating an algorithm can stimulate the designer into finding new variations of the algorithm. It also helps identifying and understanding the degenerate cases that especially occurs in geometric algorithms.

 
Figure: Delaunay Triangulation

Program enables the user to change the size of the input. Specifically, before starting the animation user can choose a number (multiple of 3) between 3 and 270 as the number points in the plane. Note that increasing the number of points increases the chance of the occurence of the degenrate cases. User needs to press start button to run the two algorithms one after the other. During the animation user can change the speed of the animation. Different colors are used for drawing the geometrical objects. Points are drawn as red tiny dots. Blue line segments are used for the edges of the triangulation. Edges of the triangulation that also belongs to convex hull are overwritten as green line segments. After the construction of the Delaunay Triangulation program provides statistics on the execution time of each algorithm and the number of edges in the Triangulation (See Figure 1.)

I also took benefit of this Object-Oriented programming language, writing Quad Edge Data Structure as seperate class. By this way, parts of the program is easy to plug into some other applications and can be easily extended if necessary.



Alper Ungor
Tue May 13 15:38:16 CDT 1997