Intersection of Line Segment


If the line cannot be trivially accepted or rejected, we must compute the intersection of the line with an appropriate window edge.

We need two equations for the line

Find the intersection with the top edge of the window:

Then, find the intersection with the bottom edge:

Now, find the intersection with the left edge:

Finally, find the intersection with the right edge:

There is no significance in the sequence of which edge to examine.


From P. Asokarathinam -- see details 27.11.1996