Supposing we have Missile A, with a position vector and velocity magnitude (ignoring acceleration, as many games do) and Spaceship B, with position and velocity vectors. Now, this missile, being a Nasty Missile of Seeking, will try to find the best intercept for Spaceship B.
Missile A has two advantages: It knows calculus and it can calculate the roots of polynomials. However, the missile, or to abstract, the programmer, is still learning calculus and wants to know if he has the right equation. (Polynomial roots will be solved by a nice fellow called Jenkins-Traub Code Implemented From Netlib)
To wit:
mp = Missile Position
mv = Missile Velocity
sp = Spaceship Position
sv = Spaceship Velocity
t = Time
According to the programmer's best guess, the equation for intercept is: tspsv + tspmv - tmpsv - tmpmv
Except I'm pretty sure I'm headed down the wrong track entirely, as there should probably be some exponents in that mess; this being an attempt at solving: (sp-mp)(sv-mv)(t)
My other option is differentiating (sp-mp)(sv-mv)^2, but I wanted to get feedback first, partly because, unless I'm mistaken, '(sp-mp)' resolves to '1'. And that seems...Odd. OTOH, the rate at which that function is changing might be what I'm looking for.
So - What have I gotten wrong, where and why?
Thanks.
Potentially-useful link to first thread.
Edit:
Summing the equations:
(a+bx) + (c+ex)
(a+1bx^0) + (c+1ex^0)
(a+1) + (c+1)
Non-viable.
Product of the equations:
(a+bx)(c+ex)
ac+aex+cbx+bex^2
Not a polynomial (can't solve with Jenkins-Traub) and doesn't quite look right.
ac+1aex^0+1cbx^0+2bex^1
ac+ae+cb+2bex
And definitely not that, I think.