Segment Intersection Problem

  • Sweep line method.
    • Static events: the endpoints are known in advance, can still be placed in a linked-list
    • Dynamic generating events: the intersection, relation of segments “flips”. Should be held in a heap. Catching these events shouldn’t be too late
    • Maintain the consecutive relationship
  • No intersection case: trapezoidal decomposition.