Bouncer

(cached)
refresh print

Bouncer


A Bouncer is an object that is very similar to a Floor. A particle hitting a bouncer will bounce off like a tennis ball. However, unlike a Floor, a bouncer is a line segment that is added by a press/drag/release sequence as in the Segment mode. Bouncers are very powerful objects for creating environmental limits to a simulation scenario. The following picture demonstrates a bouncing ball inside a polygonal region. Each edge of the region is an individual bouncer.

Starting a mass in a polygonal region
The trace of the mass



Bouncers are also essential for many physically oriented games that one might be interested in implementing in CindyLab, such as billiards and table tennis. The following picture shows a simple scenario in which bouncers and Gravity are combined.

A ball on a staircase


Inspecting Bouncers


The bouncer inspector is almost identical to the Floor inspector.

The bouncer inspector


In addition, it has a checkbox Motor Changer. If this box is checked, the animation direction of the internal spring actuators will be reversed whenever a particle hits the bouncer. For details on the actuation see Spring and Environment. This behavior would be very useful in the construction of walking engines that reverse their direction whenever they hit a wall.


Bouncers and CindyScript


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

NameWriteableTypePurpose
xdampyesreal handle to the X-damp factor
ydampyesreal handle to the Y-damp factor
simulateyesbool turn on/off simulation for the floor




Contributors to this page: Kortenkamp , Richter and Kohler .
Page last modified on Saturday 03 of September, 2011 [10:32:28 UTC] by Kortenkamp.

The content on this page is licensed under the terms of the License.


Menu