https://technicalsource9.medium.com/how-to-find-the-point-of-intersection-of-two-lines-in-matlab-98dfbbf793dd