calculate its horizontal and vertical component of its velocity