I have two lines UV and PQ, with U(15,10) V(50,25) and P(40,10) and Q(30,30).
and i am finding a point of intersection between these two points. I am forming two linear equations for that:
eq 1:
Ux + t(Vx-Ux) = Px +s(Qx-Px)
eq2
I want to solve these equations using C program to get the value of either t or s.
I used the t
from second equation and substituted it in first equation to get a formula to find s. But it did not work out. How can I solve this in a program?