Computational geometry demos
Most of these are quick hacks to demonstrate that an algorithm
described in some paper actually can be implemented, or can be
implemented to run in the given time. Some include rudamentary
animations.
Even on my hacks, I try to be careful about correctly handling
degenerate cases. If you see errors, turn on Detail,
take a snapshot of the screen and java console (e.g., with xv on unix
systems) and send it to me.
These algorithms do not take the time to
verify properties that they expect of the input---e.g., no duplicated
points, simple polygons should not have intersections and should
always be oriented counterclockwise (CCW). Input that violates these
assumptions, therefore, will cause strange results or error messages
on the Java console. (I have tried to catch all infinite loops)
Convex hulls in 2d
These take a set of points (or generate random points) and compute the
convex hull by different algorithms. The java console shows statistics
on the number of various operations. Since moar of these applets
share some essential code, it happens (in Netscape at least) that you
can enter a point set in one and compute the convex hull with each of
the others just by going to the page and clicking the applet's Update
button.
- Cubic time algorithm: test all
support lines
- Two versions of Jarvis march: one
normal, and one that deletes points found
inside the hull so far. These are quadratic, or O(nh) if the
input size is n and output size is h. R. A. Jarvis, "On the
identification of the convex hull of a finite set of points in the
plane" Inform. Process. Lett., 2, 1973, 18--21.
- Graham & Yao's incremental algorithm after sorting by quicksort or by
insertion sort. Linear time after sorting; see
R. L. Graham and F. F. Yao, "Finding the convex hull of a simple
polygon," J. Algorithms, 4, 1983, p. 324--331.
- Quickhull: The divide & conquer
algorithm that is the analogue of Quicksort for sorting. Quadratic
worst case.
- Chan's output sensitive divide, prune, & conquer
from T. M. Chan and J. Snoeyink and C. K. Yap, "Primal dividing and
dual pruning: Output-sensitive construction of 4-d polytopes and
3-d {Voronoi} diagrams,"
Discrete Comput. Geom., 18, 1997, p. 433--454.
- Relative convex hull
Algorithms on simple polygons
Triangulations
Arrangements in the plane
Page maintained by
Jack Snoeyink,