Physics Simulations

0
25

myPhysicsLab Home Page

Click on one of the physics simulations below… you’ll see them animating in real time, and be able to interact with them by dragging objects or changing parameters like gravity.

Customize and Share

There are several ways to reproduce a particular experimental setup. The easiest way is to click the “share” button.

  1. Modify the simulation by changing parameters such as gravity, damping,
    and by dragging objects with your mouse.
  2. Click the “share” button. Copy the URL from the dialog.
  3. Paste the URL in an email. Or save it in a text file for later use.

When the recipient clicks the URL, the EasyScript that is embedded in the URL will
replicate the conditions that you set up.

See
Customizing myPhysicsLab Simulations for how to customize further with JavaScript or EasyScript.

Open Source Software

myPhysicsLab is provided as open source software under the
Apache 2.0 License.
Source code is available at
https://github.com/myphysicslab/myphysicslab.
Online documentation is available.

There are around 50 different simulations in the source code, each of which has an
example file which is mainly for development and testing. These can also
be used to show simulations offline (when not connected to the internet).

The example files are available online in two forms:

How Does It Work?

Most of the simulation web pages show how the math is derived. See for example the
Single Spring simulation.

  • A physics simulation starts with a mathematical model whose variables
    define the state of the system at a given time. Each variable represents the position
    or velocity of some part of the system.
  • The heart of a physics simulation is the
    set of differential equations
    that describe how the variables evolve over time. The forces and geometry determine
    the equations.
  • The next step is getting the computer to solve the equations, a process
    that goes by the name numerical analysis.
    The Runge Kutta method is a popular choice.
  • For simulations that involve collisions there are additional steps:
    we need to detect the collision and then
    back up in time to the moment before
    the collision to modify the velocities.
  • Finally, there are lots of programming details about
    how to represent objects on the
    computer display, how to
    handle user input, how to
    synchronize with real time,
    and so on.

The rigid body physics engine is the most
sophisticated simulation shown here. It is capable of replicating all of the other more
specialized simulations. The physics engine handles
collisions and also calculates
contact forces which allow objects to push against each
other.

See also links to other physics websites.

Units Of Measurement

The myPhysicsLab simulations do not have units of measurements specified such as
meters, kilograms, seconds. The units are dimensionless, they can be
interpreted however you want, but they must be consistent within the
simulation
.

For example if we regard a unit of distance as one meter and a unit of time
as one second, then a unit of velocity must be one meter/second.

See the discussion
About Units Of Measurement
in the myPhysicsLab Documentation.

E-Mail List

Stay informed about new myPhysicsLab simulations and software.
Low volume of email. We won’t share your email address with anyone else.

About the Author

photo of Erik NeumannHi, my name is Erik Neumann, I live in
Seattle, WA, USA, and I am a self-employed software engineer. I started developing this
website in 2001, both as a personal project to learn scientific computing, and with a
vision of developing an online science museum. I grew up in Chicago near the
Museum of Science and Industry which I loved
to visit and learn about science and math.

I got a BA in Mathematics at Oberlin College, Ohio, 1978, and an MBA from Univerity
of Chicago, 1984. My first software jobs were using the language
APL which I
enjoyed for its math-like conciseness and power.

I was fortunate to get involved in the Macintosh software industry early on in 1985,
joining
MacroMind, which became
Macromedia. I led the software
development at MacroMind as VP of Engineering for 5 years. Our most significant product
was VideoWorks, which was renamed Director, and lives on today as
Adobe Director. In the
1980’s, the interactive multimedia concepts that are so common today were new and being
developed. VideoWorks was mainly an animation tool, but also incorporated programmable
interactivity. Our main competitors at that time were HyperCard, SuperCard, and
Authorware. Director was used in many different ways; I am most proud that it became
the preferred way to prototype software user interfaces for a time during the 90’s.
Director was also used to develop the introductory “guided tour” tutorial that came
with the Macintosh in the early years. And of course, Director was used for all sorts
of art, design, and marketing projects.

I went on to work at Apple Computer on new multimedia and user interface concepts
involving digital agents, animated user interfaces, speech recognition and distributed
information access. In 1991, there was a sudden flurry of activity when Apple and IBM
were trying to set up a strategic partnership. I became involved in the super-secret
negotiations, and made the suggestion that what the world needed was a standard for
multimedia that multimedia content creators could rely on to publish to (ultimately
this is what HTML became). Based on these suggestions,
Kaleida Labs was founded. Our
work there developed a product called
ScriptX,
which turned out to be very similar to Sun’s Java which was being developed at the same
time. ScriptX had goals of supporting all forms of multimedia: text, images, audio,
video, animation; being cross-platform (Mac and Windows), interpreted, object oriented,
with a garbage collector to manage memory.

I then moved to Seattle and turned my attention back to mathematics and science. I
relearned calculus by doing all the problems in my old college text book and took
further math classes at the University of Washington. I started developing this website
as a way to practice what I was learning. I am now happy to use excellent tools such as
HTML and JavaScript, and leave their development to others. I continue to work on
physics simulations, with several new ones in development.

Archive of older projects.

This web page was first published April 2001.

Read More

This site uses Akismet to reduce spam. Learn how your comment data is processed.