My friend is doing this same problem and his way of solving got him this:
s = (y3-y1+(-x1*y3+x3*y3+x1*y4-x3*y4)/(x4-x3))/(y2-y1+(-x1*y3+x2*y3+x1*y4-x2*y4)/(x4-x3));
t = (x1-s*x1+s*x2-x3)/(x4-x3)
he's not here to explain, but i can't seem to get similar answer for s equal.
I get how he for t...
the values I'm given are for checking that you have solved correctly. I'm have to make a program on matlab, that while work for any values of x1,x2,x3,x4,y1,y2,y3 or y4.
Sorry for not being more specific.
And thank you for your reply!
1. A better way to find the point of intersection of two lines is parametrically as two linear interpolations b/w inital and final points.
x=(1-s)x1+sx2
y=(1-s)y1+sy2
where x1 and y1 are the inital points and x2,y2 are the final points.
(-6,-6) (5,2)
x=(1-t)x3+tx4
y=(1-t)y3+ty4...