## An Environment for Physics Simulation

Compared to previous releases, Cinderella.2 offers a completely new suite of applications. It provides an engine for physical mass-particle/force simulations. With this engine it is possible to draw a physical experiment and execute it by pressing a play button. It is possible to combine physics elements freely with geometric elements. A detailed description can be found in the CindyLab documentation. Here we will give only a brief overview.

### Sample Applications

CindyLab is an open environment for physics simulation. It offers several elementary objects with which it is possible to create simple as well as very complex physical scenarios.
Virtual Physical Workbench
The philosophy of CindyLab is very similar to the philosophy of the geometric part of Cinderella. There one has several construction modes to set up a geometric configuration as well as a move mode in which one can explore the behavior of the construction. In CindyLab one has several tools to set up a physical experiment. By clicking a play button one can run the experiment. It is also possible to interact with the running experiment by moving free points of the construction.

An experiment with several springs
``

CindyLab is a very useful environment for free experimentation with scenarios. Often one discovers surprising effects that stimulate other experiments. Since there are no predefined experiments, CindyLab is indeed a virtual construction kit.
Explaining
For educational purposes, CindyLab is very well suited for creating well-defined experiments that exemplify well-known physical effects. The simulation engine is reasonably exact numerically, so that it provides reliable results for many interesting situations. In particular, it is possible to display and modify parameters of simulation objects via the CindyScript programming language. Since one can also easily export CindyLab constructions to HTML-pages, one can easily create interactive physics tutorials.

Demonstration of the conservation of energy
``

The range of applications reaches from completely predefined experiments that run by clicking the play button via experiments in which the student has to adjust parameters to explore some situation to open scenarios in which the student has actually to arrange the objects to get the desired interaction.

### Design and Features

Exact Integrators
The simulation engine of CindyLab is based on a mass-particle/force model. Each moving point is modeled as a pointlike particle, and the interactions are modeled as forces between the particles (or between particle and environment). The forces influence the acceleration of the particles.
The numerical simulation engine of CindyLab is based on an explicit Runge–Kutta integrator. There are many possible choices for such an integrator. We chose an integrator that represents a reasonable compromise among the desiderata of numerical reliability, flexibility, and speed. The specific integrator used in CindyLab is a Dormand-Prince-45 integrator. In the Inspector (the tool used to control the parameters of Cinderella) it is possible to readjust the numerical accuracy of the integrator. Thus it is also possible to model sensitive scenarios numerically.

A sun/planet/moon system
``

Interaction with Geometry
CindyLab is designed to interact seamlessly with the geometry part of Cinderella and with the language CindyScript. This opens several possibilities. On the one hand, one can easily enhance the visual appearance of simulations by drawing geometric decorations. It is also possible to make geometric analyses of simulated scenarios by adding a few geometric constructions. For instance, the picture below demonstrates the analysis of a planet orbiting a sun. It reveals a hidden property of the velocity vector in this situation, namely, that the velocity vector traces out a circular path. The geometric analysis was done using a simple translation that maps the velocity vector to a fixed point.

Analysis of the velocity vector in a sun/planet system
``

Interaction with Scripting
In a similar way, CindyLab can also interact with the language CindyScript. This allows all physical parameters of a simulation to be read, and many of them can be influenced directly. This offers the possibility of a detailed numerical analysis of an experiment. CindyScript also provides several operators that are designed especially for collaboration with CindyLab. In particular, it is possible to perform curve plotting of physical parameters directly or to draw the flux of a force field.

A harmonic pendulum |  | Forces in equilibrium
``

The interaction of physics and scripting makes possible a wide variety of applications. In particular, it is possible to simulate robotic constructions in which a physical robot is simulated by CindyLab and controlled by CindyScript.

Page last modified on Monday 21 of November, 2005 [22:44:32 UTC].
The original document is available at http://doc.cinderella.de/tiki-index.php?page=An%20Environment%20for%20Physics%20Simulation