VPython Help:
To launch VPython in the WL 227 Macs: Launch X11, and enter "/sw/bin/vpython" at the terminal prompt. You may also use the shorcut VPython from the X11 Application menu.
To launch VPython in the WL 228 Intel Macs: Launch X11, enter "/sw/bin/vpython2.4" at the terminal prompt. You may also use the shorcut VPython from the X11 Application menu.
The VPython shell should appear, Use File->New Window to start a blank program or File-> Open... to load a saved one.
Always start a new program with the statement: "from visual import *". Use F5 to run the program, it will ask to save it, give it a name that is associated with your name and its purpose to make easier to find later (for example: BenNewton.py). You are encouraged to save a copy in your Angels student folder by dragging the file into it. To locate the file you need to find it by opening the Macintosh HD icon and look for it in the the folder examples in:
sw/lib/bin/python2.3/site-packages/visual/examples/.
To log in your Angels folder: In the Finder Mode (click on the desktop) , Select Go->Connect to Server->Type: angels.sewanee.edu, and:
Enter Name (e-mail up to the @)
and Password (4 last digits of ID).
If succesfull, an icon with your name will appear in the desktop, Double click to open your folder. You can drag and drop items into it. Remember to log out by dragging the icon into the trash ("Disconnect").
If you are using Windows XP use the Run... from the start menu, and type:
\\angels.sewanee.edu
and enter Username and Password as indicated above.
Useful VPython "tricks":
1) If you don't want the scene to autoscale (for instance in the bounce.py program it zooms in and out as the ball moves towards or away from the floor to keep all objects withiin view) type in the second line:
scene.autoscale=0 which makes autoscale "false" (disabled).
2) If you want a specific color, enter it as (R,G,B) , that is RGB (Red Green Blue) code where the numbers go between 0 and 1. For example:
sphere(color=color.red) creates a plain red sphere, and
sphere(color=(1,0,0)) creates the same one (100% red), while
sphere(color=(1,0.1,0.9)) creates the nice "purplish" sphere below:

Of course:
sphere(color=(1,1,1)) creates a plain white sphere, and
sphere(color=(0,0,0)) creates a plain black one.
3) Visualizing velocity
We will often want to visualize vector quantities, such as the ball’s velocity. We can use an arrow to visualize the velocity of the ball. Before the while statement, but after the program statement setting the ball’s velocity, ball.velocity = vector(2,1.5,1) we can create an arrow:
bv = arrow(pos=ball.pos, axis=ball.velocity, color=color.yellow)
It’s important to create the arrow before the while loop that advances in time.
3) To create a "trail"
Sometimes we are interested in the trajectory of a moving object, and would like to have it leave a trail. We can make a trail out of a curve object. A curve is an ordered list of points, which are connected by a line (actually a thin tube). We’ll create the curve before the loop, and add a point to it every time we move the ball.
After creating the ball, but before the while 1: time loop, add the following line:
ball.trail = curve(color=ball.color)
This creates a curve object whose color is the same as the color of the ball, but without any points in the curve.
At the end of the loop, add the following statement (indented):
ball.trail.append(pos=ball.pos)
This statement adds a point to the trail. The position of the point is the same as the current position of the ball. As time progresses and the position of the ball is updated every dt one more point is added to the trail.
Example program (from the Tutorial) (download here)