|
Visual Python
|
Visual Python is an innovative extension to the Python scripting
language that combines the ease of use of Python with the power of the
OpenGL 3D graphics environment. Here are a few projects, some of which
have been written by our students as part of Drexel's 1st year
Contemporary Physics Sequence.
You can hover over many of the images to see a short animation.
|
Ring of Charges
|
Equally charged particles on a ring interacting through a central
potential. Charge number,sign, magnitude, and ring size are
variable. Also, the 1/r Coulomb potential can be be changed to any
(1/r)^n type central potential. A velocity-based friction gradually
slows down the particles to find the minimum energy configuration,
which of course is always a symmetric ring of equidistant particles.
|
Sphere of Charges
|
Equally charged particles on a sphere interacting through a central
potential. Reveals interesting minimum energy configurations for
different particle number. Same options as ring simulation.
|
Torus of Charges
|
Equally charged particles on a torus interacting through a central
potential. Reveals interesting minimum energy configurations for
different particle numbers and torus inner/outer radius ratios.
|
Coupled Pendulums
|
A system of pendulums coupled with springs. Pendulum number and spring constants
are variable. Setting the spring stiffness comparable to the rod
stiffness brings about interesting behavior. For weaker springs, you
can see the system energy transfer between pendulums.
|
Gas Under a Piston
|
Particles interact and transfer momentum between piston and other
particles. Demonstrates properties of ideal gas when particle-particle
integrations are disabled. Particle number, kinetic energy, particle
and piston mass, and all dimensions are variable. Particle velocities
are thermalized to the Boltzmann distribution.
|
Gauss's Law
|
Demonstrate Gauss's law for total charge within a square Gaussian
surface. Integrate the electric field over the surface of the cube to
determine the total contained charge.
|
Magnetic Field of a Ring of Current
|
A simple simulation using the Biot-Savart law to graph a 2D slice of
the magnetic field induced by a ring of current. No animation.
|
Pogo Stick
|
Simple spring mass systems can be used to simulate a wide variety of
objects. The charge configuration and pendulum simulations shown
above are really just spring-mass systems. This pogo stick is the
simplest system having one mass (the handle bars) and one massless
spring (in red). Issues like balance and friction have of course been
ignored, although it would be interesting to see such phenomena incorporated
into more complex spring-mass "bouncy" objects.
|