geometry-challenged
Brian Yennie
briany at qldlearning.com
Sun Jan 25 20:02:21 EST 2004
For the problem at hand, it should suffice to add a little if-logic to
the beginning.
A line between two non-overlapping objects will always intersect
exactly one of the sides of each object- you just have to pick the
right one and _then_ use the intersection function.
With that said, an intersection function should probably error
gracefully for parallel lines (i.e. non-intersecting).
- Brian
> I tried the function on two *non*-intersecting lines, and it gave
> me a "divide by zero" error. Not good. You need to find the
> mathematical intersection of the infinite lines defined by the two
> pairs of endpoints, and *then* decide whether or not that intersection
> point is within *both* of the line *segments* defined by said points.
More information about the use-livecode
mailing list