Much better is computing the direction and magnitude separatly:
- Get the difference between those positions and calculate the magnitude of it pj - pi.
- Normalize the difference, by dividing it by its magnitude - this gives you the unit vector/direction
- Initialize the velocity of the rocket to = Normal * Magnitude / DT. (DT = Delta time in seconds - for example 0.016 - 60 fps)
- Initialize the position to (10, 10)
Now its just a matter of simple euler integration to let the rocket fly :-)
rocket velocity += rocket acceleration * DT (In your case acceleration is zero)
rocket position += rocket.velocity * DT
Also with damping enabled of your integrated velocity, you can achieve a speed increasing or decreasing rocket.
rocket velocity += rocket acceleration * DT (In your case acceleration is zero - so you can skip this step)
rocket velocity *= 1.025 // Slight speed-increase over time
rocket position += rocket.velocity * DT