|
-
Mar 12th, 2003, 05:01 PM
#1
Thread Starter
Hyperactive Member
line segments intersect
is this right equation to find wether 2 line segments intersect where
ab and cd are the segments
r=((ay-cy)(dx-cx)-)ax-cx)(dy-cy))/((ay-cy)(bx-ax)-(ax-cx)(by-ay))
s=((ay-cy)(bx-ax)-(ax-cx)(by-ay))/((bx-ax)(dy-cy)-(by-ay)(dx-cx))
and they intersect where r and s are >=0 and <=1
thanxs
-
Mar 12th, 2003, 05:29 PM
#2
Thread Starter
Hyperactive Member
also in both these equation if the denomator turns out to be 0 are the lines not intersecting??
-
Mar 12th, 2003, 11:52 PM
#3
-
Mar 13th, 2003, 02:01 AM
#4
Addicted Member
I don't think he means terms like 'ay' to mean a*y; I think he means the y value of point a, ie ay.
If I have a chance I'll check the equations and respond later. Mathworld gives a solution using matrices.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|