Back to index

Java version of game

Plotting a Projectile in Motion:

The following formulas are used to plot the position of the cannon ball in
the applet on this page:

x = x0 + V * cos(angle) * t y = y0 + V * sin(angle) *t - (1/2) * g * t^2 where: x0 = starting x coordinate y0 = starting y coordinate t = time V = initial velocity angle = firing angle g = gravitational effectA slight variation of this formula is used in this applet, but the result is still a parabola.