This project demonstrates a method for finding the intersection point of two line segments, if any. Click and drag the vertices to change the line segments. When the line segments intersect, a red dot will indicate the intersection.
I don’t like Cramer’s rule, so I did it using equations instead. Basically you can write lines inside of a Cartesian plane like the one scratch uses as linear equations. y = mx + q Where m is the gradient of the line (idk if ‘gradient’ is the right word here) The intersection point between two equations is the solution to a system with their equations. It’s far simpler but it’s not faster. Whatever!