My math is very shaky, and I'm trying to use the following tutorial to get a grasp on vectors and collision detection/response:
http://www.tonypa.pri.ee/vectors/tut05.html
I've made an example and I'll just go through the process then explain my questions.
After some research, I've learned that the t value he's using is a factor in the parametric equation of a line (x,y)=(1-t)(x1,y1)+t(x2,y2). So I need to find the ratio t of vector a at which it intersects b. Then I'll add that to the starting position of a to get the point at which the two vectors intersect.
First I find c, which is the vector between the starting points of a and b. c = (-1,-4). I can then (apparently) solve for t using the ratio of the Dot Products of the normals of my vectors (Perp Product).
t = (c * b) / (a * b).
c*b = (4*6) + (-1*1) = 24 -1 = 23
a*b = (5*6) + (4*1) = 30 + 4 = 34
t = 23/34
a*t is (46/17,-115/34). Adding that to the starting point of a, I get (80/17,-55/34) ? (4.7,1.6), which looks to be right.
I have all the steps down, but I'd like to get a better understanding of the math behind it. Specifically, there's a bit of a logical leap while solving for t. I don't understand how the Perp Product gets us the ratio we need to find the intersection point, or how the vector connecting the two starting points is involved. Any explanations on that or links to theorems explaining it would be really appreciated, as well as any corrections to my explanation.