> Your program took about 43-46 ticks to run (after I altered >it to draw 500 random lines) whereas, my program took 30 ticks to about the >same thing. However, please keep in mind that my program draws double lines >and other such cute stuff to show what's happening and that takes time. Tedd: Your code looks great, but as I understood it, the original poster already had the code to draw the lines and rectangles and was just interested in the routine to check for intersection. If you have time, maybe you could just time the two different intersection routines (placing the time checks in the same relative positions that I had in the original code). It looks like the Quickdraw code will come out faster, but it would be interesting to know how much faster. You probably noticed the error too, in the equation: y#=(e.yy%(2)-e.yy%(1))/(e.xx%(2)-e.xx%(1))*(v.xx%(i%)-e.xx%(1))+e.yy%(1) Since pixels only have integer coordinates, the y# should have been an integer variable (otherwise the routine would have considered to have coordinates like (100,1.0001) in its comparison logic). Keep up the good work. ____________________ wave(Toronto, Canada) Genius is 50% inspiration, 50% perspiration, and 50% having the right tools.