The Polygon Intersector Applet
How to use the applet:
-
It takes a little while to get the applet user interface loaded; expect
about 10 seconds if you are located in a school lab near University
of Montreal; if you are using a modem, it will of course take a little
longer. It shouldn't go over 30 seconds (it's an 85Kb download).
-
On some viewers (such as netscape), the java.awt.MediaTracker is a bit
broken. As a result, the very first time a vertex of a polygon should
appear, it may take some time to display (2-5 seconds; it's another 400
bytes download).
-
Draw the polygons in CLOCKWISE order. The user interface will not
let you draw something that is not convex or is not in clockwise order.
Try it and you'll see.
-
When in insert mode, the vertex to be inserted must be next to the last
vertex inserted, in clockwise order. I haven't implemented inserts at arbitrary
points on the polygon.
-
Resizing the window will give you extra precision, not extra space.
The source code of the applet is available here
(tar.gz format). The javadoc-generated documentation can be found
here. It is rather terse, but it is still
useful as a reference while reading the source code..