Parity Fill
Problem:
    For each pixel determine if it is inside or outside of a given polygon.
Approach:
  • from the point being tested cast a ray in an arbitary direction
  • if the number of crossings is odd then the point is inside
  • if the number of crossings is even then the point is outside



  • Very fragile algorithm
  • Ray crosses a vertex
  • Ray is coincident with an edge
  • Commonly used in ECAD
  • Suitable for H/W
Lecture 8 Slide 3 6.837 Fall '98