## Floor

A floor is a horizontal line through which no mass particle can pass. Mass particles that hit the line will bounce of like light tennis balls. A floor is added either by a press/drag/release sequence or by a simple click. It may also be attached to an existing point. Floors can either model completely elastic bounces or be equipped with a coefficient of friction that reduces a particle's velocity whenever it hits the floor. The following picture shows the behavior of a point that bounces off a floor (with a small coefficient of friction).

A ball under gravitational attraction meeting a floor

A floor is very similar to a Bouncer, which behaves like a segment of a floor.

### Inspecting a Floor

The floor inspector has three values that can be adjusted:

The floor inspector

X-Damp and Y-Damp are damping factors that can attain values between 0.0 and 1.0. The two numbers dx = 1 – X-Damp and dy = 1– Y-Damp are factors by which the x- and y-components of a mass-object’s velocity are multiplied whenever the mass-object hits the floor. Thus if both sliders are set to 0.0, the point will bounce off without any damping, while if both sliders are set to 1.0, the particle will stop moving as soon as it hits the floor.

### Floors and CindyScript

Like any CindyLab object, a floor provides several fields that can be read and set by CindyScript. The following list shows the accessible fields for a floor:

- xdamp: handle to the X-damp factor (real number, set and read)
- ydamp: handle to the Y-damp factor (real number, set and read)
- simulate: turn on/off simulation for the floor (Boolean, set and read)

### See also

- Bouncer

Page last modified on Thursday 17 of November, 2005 [20:37:07 UTC].
The original document is available at http://doc.cinderella.de/tiki-index.php?page=Floor