## The Elements of CindyLab

As mentioned in the previous section, simulations in CindyLab are modeled as systems of pointlike particles and forces that influence their movement. The most fundamental unit in CindyScript is a Free Mass. Such a mass is much like a usual geometric point in Cinderella. However, it has a number of additional properties besides its position, including a current velocity, a mass, and a charge. A simulation in CindyLab causes the masses to move according to the parameters of the simulation. Adding a free mass is like adding a free point, and you can use either of these two modes for it:

| Free Mass
| Velocity

The movements of the masses are influenced by forces. These forces may have various origins.

- First of all, there can be environmental forces such as gravitational forces (constant or otherwise) and magnetic fields. They can be added via the three modes:

| Gravity
| Sun
| Magnetic Field

- Second, there may be forces between a specific pair of masses. Usually, these forces correspond to springs or to an electromagnetic or gravitational interaction. There are several modes for adding such an individual interactions between particles:

| Rubber Band (Spring with zero length)
| Spring
| Coulomb Force

- Finally, the forces may come from settings related to the Environment, such as universal gravity or interactions affecting all particles in the system.

A last ingredient to CindyLab is the ability to put walls and floors into a physical experiment. Whenever a particle encounters such a so-called bouncer, it bounces off like a tennis ball. One can add bouncers via the following two modes:

| Floor
| Bouncer

The behavior of any of these objects can be influenced by precise settings, which are entered via the inspector (or CindyScript). The sections on the different elements of CindyLab describe the variety of parameters that are available for each of these objects.
In addition, properties that apply to all physical objects can be controlled by the global setup Environment .

## Starting a Physics Simulation

As soon as physical objects are present in a drawing, an animation control device will show up in the geometric views. With this control device one can play/stop/pause the physics simulation, just as in Animation mode. As in animation mode, it is possible to grab and move free points or free masses at any time.

A simple physics scenario with animation control

Starting the physics animation will automatically switch to move mode. As soon as you change to another mode, the physics animation will stop. Note that the accuracy and the global frame rate of the simulation can be adjusted by the environment inspector.

## The Environment

Another extremely important ingredient of CindyLab is the Environment. The environment collects properties of physical elements that are considered to be common to all physical objects. There you find such elements as global friction and global gravity. There you can also control whether there is an interaction between arbitrary mass particles by gravity or electrostatic forces. All these properties can be influenced either by the inspector or by suitable CindyScript statements.

Page last modified on Thursday 25 of August, 2011 [07:40:39 UTC].
The original document is available at http://doc.cinderella.de/tiki-index.php?page=The%20Elements%20of%20CindyLab