How to Use The General Line Segment Intersection Applet
Input Assumptions:
- No line segments are vertical.
- No three line segments intersect at a single point.
- No more than 26 line segments are entered.
How to Input Information to the Applet:
-
Insertion of Segments: In the applet's canvas area, click the left mouse button and drag the mouse. Release the left mouse
button once the appropriate line has been created. Repeat this process up to 26 times.
How to Use the Applet:
-
Execution Mode: Two execution modes are available. "Continuous" mode will run the entire algorithm at once, reporting all
intersection points. "Stepwise" mode will run the algorithm step by step, giving you a chance to inspect the sweep schedule (Q) and
the sweep status (D) as the algorithm progresses.
-
Run: Once the execution mode is chosen, click the "Run" button to execute the line segment intersection algorithm.
-
Next Step: This button is only used when in "Stepwise" mode. Press the button each time you want to move to the next step of
the algorithm.
-
Demo: This button is used to give a demonstration of the algorithm without having to enter any input information. Pressing this
button will create ten random line segments and begin executing the algorithm in the current execution mode (i.e. "Continuous" or "Stepwise").
-
Reset: Reset the applet. This will provide a fresh canvas to enter new line segments for intersection testing.
Output of the Applet:
-
White Circles: Represent the event points that are currently stored in the sweep schedule Q.
-
Red Circles: Represent the currently reported intersection points.
-
Flashing White/Red Circles: Represent intersection points that have been detected, but not yet reported, by the algorithm.
-
Blue Lines: Represent the input line segments.
-
Green Lines: Represent the line segment(s) corresponding to the current event point intersecting the sweep line.
-
Pink Line: Represents the line immediately ABOVE the green line(s) on the sweep line.
-
Light Blue Line: Represents the line immediately BELOW the green line(s) on the sweep line.
-
Two Columns on the Right: Represent the contents of the sweep status structure (D) at the previous step of the algorithm
and at the current step of the algorithm.
Back to the General Line Segment Intersection Applet