Left click to move the ray origin.
The Line-Line intersection wikipedia page : https://en.wikipedia.org/wiki/Line%E2%80%93line_intersection