The Motion Applet
Computational Physics and Graphing
This applet is designed to produce quick graphs of an object subjected to classical physical forces in a simple one-dimensional environment using differential approximations. It can also be used to compare different approximation methods.
Enter the acceleration equation and initial conditions in the input boxes to the left, or choose an example environment from the menu. Choose the approximation method you want to use (Euler, RK2, or RK4) by selecting the appropriate tab and checking the check box. You can use multiple methods at once by leaving multiple check boxes checked. Click the calculate button to produce values in the table. Once you have values in the table, you can graph them in the area below the table. But first you have to set the graph bounds (on the horizontal and vertical axes). You can enter these yourself or you can click "Find Extremes" and let the applet find the largest bounded graph for you. You can graph any expression on either axis (default x vs t) by filling in the appropriate input boxes.
If you change any initial conditions, you have to press the calculate button to update the data. Any time you recalculate data the current graphs will disappear and you will have to press the graph button again (and perhaps find new bounds) to see a graph of the new data. If you change the graph bounds, you will have to press the graph button again to see the updated graph.
Entering expressions (in the acceleration box and the axis expression boxes) requires some special care. All the arithmetic operators (*,/,+,-) work. In addition the common trig functions (sin(), cos(), tan()) and their inverses (asin(), acos(), atan()) can be used as functions (eg: -sin(x)). In addition, sqrt() is the square-root operator, and "^" is the general power operator (eg: x^3 means x cubed). Finally, there are functions for natural log, ln(), and absolute value, abs(). Parentheses can be used to group sub-expressions (eg: (5+3)/4), but cannot be used as multiplication operators (eg: you can't do 3(4+x); you must explicitly put in the multiplication: 3*(4+x)). You can use three physical variables, position (x), velocity (v), and time (t) as well as the constants PI and E. In the graphing expressions, you may also use a for acceleration. Blank spaces can be used anywhere you want; they are ignored by the applet.
Copyright (C) 2001 Benjamin Lee
This software comes with ABSOLUTELY NO WARRANTY. It is free, along with the source code, and is protected under the GNU General Public License. This means you can redistribute the program at your will, as long as you leave the license and copyright notices intact, make no changes to the source code, and make the source freely available with any compiled files. You may also make changes to the source code as long as you leave the original copyright notice, make it clear that any changes you make are yours, and place the modified version under the GNU General Public License.