Calculation of initial velocity and angle