How to check if 2 rays intersect?

Правка en1, от TheScienceGuy, 2020-12-03 08:12:10

We are given the 2D coordinates of 2 points: the first point is where the ray starts and it goes through the second point. We are given another ray in the same way. How do we determine if they have a point of intersection? I would like to know the general algorithm and its explanation, don't mind about the extreme cases (e.g. when the rays have the same starting point). P.S. I saw a similar question on stack exchange, but the answers were not backed up by explanation.

Теги computational-geometry, algorithms

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский TheScienceGuy 2020-12-03 08:12:46 15 Tiny change: 'ordinates of 2 poin' -> 'ordinates (all integers) of 2 poin'
en1 Английский TheScienceGuy 2020-12-03 08:12:10 506 Initial revision (published)