3D lecture-demo programs for mechanics

The work below is licensed under a Creative
Commons Attribution 2.5 License. Please read the license before downloading
the software.
The initial number is the chapter of Matter & Interactions (3rd
edition) in which the program is most useful.
Read the text at the start of the program for how
to use the program.
Install VPython to use these programs.
Here are all of the programs listed below, in one zip file.
01_3Dvector.py (display a vector in 3D)
02_newton.py (drag an object with a single force illustrating the Momentum Principle, Newton's 2nd law)
03_particle_collision.py (click to see a collision)
03_doublependula.py (demonstrate sensitivity to initial conditions with two double pendula)
03_3body_3D.py (3D motion of three stars)
03_threebody.py (three-body
motion; the first execution after saving the program generates example
files)
The examples include "x=-2.76" and "x=-2.765" which
are nearly identical initial conditions
which however have very different trajectories, an example of extreme sensitivity
to initial conditions.
04_speed_of_sound.py (model propagation of sound in aluminum and lead)
06_potential_energy_well.py (design a potential energy well and observe motion in the well)
08_absorb_emit.py (atoms absorb energy from electron beam, emit photons)
08_Bohr_levels.py (visualization of Bohr model, with accompanying energy diagrams)
08_Franck_Hertz.py (simplified Franck-Hertz experiment; an electron with sufficient energy can raise a mercury atom from its ground state to an excited state)
08_quantum_oscillator.py (quantum harmonic oscillator, with classical oscillator display for context)
08_spectrum.py (how a diffraction grating displays emission spectra and dark-line absorption spectra)
09_RotateVibrateTranslate.py (two balls connected by springs rotate, vibrate, and translate)
09_twopucks.py (rotating and nonrotating pucks)
10_Reference_Frames.py (view a process from lab and center-of-mass reference frames)
11_crossproduct.py (illustrate
cross product in 3D)
11_crossproduct_area.py (illustrate
cross product in 3D, with parallelogram area shown for magnitude)
11_ferriswheel.py (show r and p vectors for circular motion)
11_barbell_ang_mom.py (show translational and rotational angular momentum)
11_wheel_L.py (angular momentum of a rotating wheel)
11_drop_clay.py (drop some clay onto a wheel)
11_angular_momentum_binary_star.py (shows angular momentum of each star, and the sum)
11_gyro.py (gyroscope
suspended from a spring)
11_gyro2.py (gyroscope on pedestal, illustrating nutation; uses Lagrangian mechanics)
12_wells_oscillator.py (semiclassical 3D oscillator)
13_gas.py (hard-sphere
gas; exhibits Maxwell-Boltzmann speed distribution)
13_path_of_gas_atom.py (watch the path of one atom in a gas)
13_piston.py (move piston up and down, see effects on gas)
13_carnot.py (illustration of Carnot engine and Carnot cycle)

