Use the sliders to change the shots' power and angle. Press space to shoot. The ball will draw its line of trajectory. Press the flag to restart. When you do this, the sand and the golf post will go to a random place.
I used a gravity variable to make the trajectory.