geometry-challenged

Brian Yennie briany at qldlearning.com
Sat Jan 24 21:22:03 EST 2004


If we're just intersecting lines with rectangles, trig isn't even 
necessary here.
Just use good ol' slope and intercepts:

http://www.delphiforfun.org/Programs/Math_Topics/intersecting_lines.htm

A little simple if/then logic can figure out which edge of the rect you 
want to intersect with on each button. Take the imaginary line between 
the centers of the objects, and intersect it with the edge being 
crossed. All you need are the two locs of the objects, and the two 
corners of each edge you want to point to.

function intersect line1, line2
...
end intersect

HTH
Brian



More information about the use-livecode mailing list