Line Intersections (Plane Sweep)
Description
This applet demonstrates the working of a plane-sweep algorithm
in finding the intersection points among a set of lines.
- Click and drag mouse to draw a set of lines inside the applet window.
- Start: After you have drawn a set of lines, click this button to start the plane-sweep algorithm.
A
vertical line sweeps the plane from the first to the last point using an event queue that containts all points sorted by x-coordinate.
The points of intersection are shown in red colour.
- Refresh: Click this button to refresh applet window and to start a new input.
Computational Geometry
Java Applets Centre
R. Mukundan
Department of Computer Science
University of Canterbury
Private Bag 4800, Christchurch
New Zealand.