Example 1 - Line Passing Through Window


The next step we consider if tvalue is entering or exiting by using inner product.

(Q-P) = (15+5,9-3) = (20,6)

At left edge (Q-P)nL = (20,6)(-10,0) = -200 < 0 entering so we set tmin = 1/4

At right edge (Q-P)nR = (20,6)(10,0) = 200 > 0 exiting so we set tmax = 3/4

Because then we draw a line from (-5+(20)*(1/4), 3+(6)*(1/4)) to (-5+(20)*(3/4), 3+(6)*(3/4))

From P. Asokarathinam -- see details 27.11.1996