This applet will attempt to produce a 3D realization of a pair of triangulations according to Dekster's theorem.
- Enter a convex polygon by clicking on the white canvas. Click on the starting point to finish the polygon.
- Select the Diag1 mode at the top of the applet and add a complete set of diagonals. The applet will prevent invalid diagonal from being input. If this happen an error message will be printed to the text panel at the bottom right corner.
- Select the Diag2 mode and enter a second set of diagonals distinct from those entered in step 2. The applet will prevent you from entering the same diagonal twice.
- Press the Do 3D button to see is the polygon and triangulations you entered can be turned into a 3D polyhedron according to Dekster's theorem. If they can you will see them pop up in the smaller white canvas. You can manipulate them as with any of the other examples.
- Press the Clear button to clear all input and start over with a blank canvas.
Then press the Poly button to enter a new polygon.
About the Applet:
The applet was programmed by combining heavily modified versions of the GeomCanvas and CompGeom classes provided as accompanying code to Computational Geometry in C by O'Rourke, with an equally heavily modified ThreeD class which is provided by Sun as a stock example with most Java distributions. The only truly original code is contained in the dekster class which tests triangulations and constructs 3D representations where possible. This class consists of approximately 400 lines implementing the algorithms described in the previous section.