|
-
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
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
|