3D lecture-demo programs for E&M

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 (2nd
edition) in which the program is most useful.
The numbering will be updated soon to correspond to the 3rd edition.
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.
fields.py (general
program to demonstrate electric and magnetic fields, Gauss's law, Ampere's
law, potential)
Right-click dipoles.em to
get a data file for a stack of dipoles, cap.em for
a capacitor, and current_sheets.em that
create magnetic fields.)
13_E_point_charge_drag.py (electric field throughout space around a charge; can drag the charge)
14_MobileElectrons.py (shift the electron sea back and forth with the mouse)
14_spark_mean_free_path.py (watch one atom move through a gas)
15_E_ring_demo.py (add up pieces of a ring to make electric field of a ring)
15_E_disk_add_rings.py (add up electric field of rings to make field of disk)
15_E_disk.py (electric field near a disk)
15_E_sphere_outside_rings.py (electric field outside a sphere, adding up rings)
15_E_sphere_rings.py (electric field inside a sphere, adding up rings)
17_crossproduct.py (croos product in 3D)
17_MobileElectronCurrent.py (continuous shift of mobile electron sea due to nonzero electric field in wire)
17_B_long_wire.py (magnetic field near a long straight wire)
17_Bloop_with_r_dB.py (magnetic field of loop, adding up segments of loop)
17_Bwire_with_r.py (magnetic field of wire, adding up segments of wire)
17_B_loop.py (magnetic field near a current-carrying loop)
17_solenoid_drag.py (drag mouse around inside and outside a solenoid to see magnetic field)
18_Erings.py (display
electric field inside a wire made by gradient of surface charge)
18_Erings2.py (also
displays electric field outside the wire)
19_RCcircuit.py (numerical integration of an RC circuit)
20_B_movingproton.py (magnetic field of a moving high-speed proton)
20_E_movingproton.py (electric field of a moving high-speed proton)
20_helix_in_B.py (helical motion of a proton in a uniform magnetic field)
21_Gauss_2win.py (navigable 3D version of the diagrams in Chapter 21 on Gauss's law)
22_Faraday-magnet.py (Faradays' law: moving magnet)
22_Faraday-coil.py (Faradays' law: coil with time-varying current)
23_radiate0_fieldlines.py (nature of radiative field lines)
23_radiate_kink.py (development of kink in electric field of accelerated charge)
23_Radiation2D_showR.py (radiative E and B spreading out in a plane from accelerated charge)
23_Radiation3D.py (radiative E and B spreading out in 3D from accelerated charge)
23_pulse_sq.py (one pulse of radiative E and B fields)
23_sinusoidal_wave.py (sinusoidal wave displaying E and B, and wavelength)
23_plane_sinusoidal_wave.py (a phalanx of radiative E and B fields)
23_antenna.py (radiation spreading out from an antenna)
24_interf_constructive.py (constructive interference from two radiators)
24_interf_destructive.py (destructive interference from two radiators)
24_interf_both.py (both constructive and destructive interference from two radiators)
24_crystal_planes.py (show crystal structure and crystal planes)
24_powder_xray.py (aspects of powder x-ray diffraction)
24_standing_wave.py (two traveling waves add up to a standing wave)

