Line Intersection
In Chapter 7, section 4 a line intersection algorithm was presented. Once the line sweep had identified potential intersection, it was necessary to check for an actual intersection using:
(Px,Py)=((x1−x2)(y3−y4)−(y1−y2)(x3−x4)(x1y2)(x3−x4)−(x1−x2)(x3y4−y3x4),(x1−x2)(y3−y4)−(y1−y2)(x3−x4)(x1y2=y1x2)(y3−y4)−(y1−y2)(x3y4−y3x4))
The above is simply determinants written out! It is possible to compute the above using:
