A quick prototype to test a function, that gives, if it exists, the intersection point of 2 lines.
key 1 or 2 : select the redLine or the blueLine.
left click : set the new starting position of the selected line.
right click : set the new ending position of the selected line.
To tweak this sketch, first download it.
Make your updates, then upload your tweak!