Monday, November 16, 2015

Line clipping algorithm



1.      Parametric representation of Line segment with endpoints (x1, y1) and (x2, y2)
x = x1 + u(x2-x1)
y = y1 + u(y2-y1) ; 0<=u<=1
2.      Exterior of the window
– Intersection with outside the range u
3.      Interior of the window
– Intersection with inside the range u

No comments:

Post a Comment