Tuesday, April 1, 2008

2d line intersection

Playing around with line intersections again. There are two sites I found useful:
Intersection Point Of Two Lines
and N Tutorial's great site (I wish they had done more tutorials but they were probably busy doing N+).

To visualize it all I created a little cocoa app which displays two lines, the intersection point, a normal and a reflected ray from the intersection point:




Download Cocoa Project Source (requires Xcode dev tools): 2d_intersect.zip