Determining if two rays intersect

Posted by Faken on Stack Overflow See other posts from Stack Overflow or by Faken
Published on 2010-05-28T18:30:54Z Indexed on 2010/05/28 18:41 UTC
Read the original article Hit count: 175

Filed under:
|

I have two rays on a 2D plane that extend to infinity but both have a starting point. They are both described by a starting point and a vector in the direction of the ray extending to infinity. I want to find out if the two rays intersect but i don't need to know where they intersect (its part of a collision detection algorithm).

Everything i have looked at so far describes finding the intersection point of two lines or line segments. Anyone know a fast algorithm to solve this?

© Stack Overflow or respective owner

Related posts about c++

Related posts about geometry