Web's Best Code Adjustments

The Web's Best Code Adjustments is an area where we made changes to code of existing software (as permitted by the license agreements).

PHET Projectile Motion Simulator (modified)

Projectile Motion with Larger Limits

The PHET projectile motion interactive simulator is an awesome piece of software. It allows the student to perform labs or experiments changing various values such as cannon height, velocity, air resistance and gravity.


We found it was quite limited with some of the ranges which are hard coded in the html code. For example, the gravity settings could not simulate a projectile motion simulation on Jupiter, or even on our moon. Some lab exercises we have seen have larger values for the initial height of the cannon.


We tweaked the original code and increased the limits of some of the adjustable parameters.

Here is a link to the new projectile motion simulator with the limits extended.

Summary of Changes

A summary of the changes we included:

  1. Changed GRAVITY_RANGE from 5 - 20 to 1 - 50 meters per second per second
  2. Changed CANNON_HEIGHT_RANGE from 0 - 15 to 0 - 300 meters
  3. Changed LAUNCH_VELOCITY_RANGE from 0 - 30 to 0 - 100 meters per second
  4. Changed MIN_ZOOM from 0.25 to 0.01

The modifications above obey the GPLv3 licensing terms of the developers.

Have fun!

Note: If there are some ranges which still need to be increased, just download the original code from PhET by going to the page, save the source code, then modify the code. Hint: Look for the settings above.