The Visual Module of VPython

VPython is the Python programming language plus a 3D graphics module called "Visual" developed by David Scherer. This document describes all of the Visual capabilities. To invoke the Visual module, place the following statement at the start of the file:

> ## from visual import *

Introduction: for those new to Python and Visual

New with VPython beta version 4
opacity, suface texture, sophisticated lighting, points, frame scale, nonuniform axes, label font

Basic Display Objects

cylinder | Start with cylinder. Much applies to other objects.
arrow | label
cone | frame: combining several objects into one
pyramid | faces: low-level object for special purposes
sphere | Additional Attributes: visible, frame, display, class, members
ring | Convenient Defaults
box | Rotating an Object
ellipsoid | Specifying Colors
curve | Deleting an Object
helix | Limiting the Animation Rate
convex | Floating Division: 3/4 is 0, but 3./4. is 0.75 in Python

Vector Computations

- vector, including mag, mag2, norm, cross, dot, rotate, diff_angle, as_tuple

Plotting Graphs of Functions or Data

- Graph Plotting: gcurve, gdots, etc.

Windows, Mouse, and Keyboard Interactions

- Controlling Windows: display windows, lighting, camera position, and stereo
- Mouse Interactions
- Keyboard Interactions
- Controls: buttons, sliders, toggle switches, and pull-down menus

The factorial and combin Functions

- factorial & combin: N! and a!/(b!*(a-b)!)

VPython documentation was produced by Ruth Chabay, David Scherer, and Bruce Sherwood.