Dynamics of the basketball shot with application to the free throw