Sweepline Events
• We use an event-driven
simulation to move the
sweepline
• Events are
– Segment start
• When we first encounter a
segment
– Segment end
• When we reach the
segment’s other endpoint
– Intersect segments
• When we reach a segment
intersection
• Some of the events, we
know ahead of time
– Segment start
– Segment end
• If we knew all events ahead
of time we could sort them
and do without a Priority
Queue, but we don’t...
• For segment intersection, we
have to determine these
events as we move the
sweepline, so we need a PQ
CS409 - Spring 2000
4