Projectile Motion

The first problem that was attempted was an illustration of projectile motion.  This was primarily used to learn how to create a simulation by using animation.  A projectile is launched from a starting position with a given initial velocity and angle.  The user is able to change these two parameters, and when the start button is pressed, the path of the projectile for the given initial values is traced across the screen.  A screen capture of this problem is shown in Figure 2.


Figure 2: Projectile Motion

The input values are the initial velocity, , and the initial angle, .  The x and y positions change for each time step, and the equations by simple kinematics are as follows:


The applet draws the new position of the projectile for each time step to give the apparent motion of the particle.  The program stops when the current value of the y coordinate is less than the starting position.