The trajectory of a golf ball is affected by the details of the stroke: initial velocity, initial direction (vertical and horizontal), air resistance, lift, drag, and spin. Vary these factors to get the trajectory (red line) and compare it to the one without corrections (black line). The inset shows the and coordinates of the point of impact of the drive. You can simulate the flight portion of various golf strokes (drive, chip, bunker shot, etc.).
The drag coefficient depends only on the size of the ball, whereas the lift coefficient depends on the smoothness and the state of spin as determined by the initial velocity and the angle of the club face (Magnus force). Adding dimples can supply lift, noticeably lengthening the drive. Changes in the horizontal angle not only produce hooks and slices, but applying simultaneous lateral spin leads to lateral curvature in the flight. This calculation takes no account of bounces, obstacles, wind, or varied terrain.
The equations used are the following, with lift coefficient , drag coefficient , spin of as air density , gravity , mass , area , initial velocity , and .