Bouncing Ball

class otp.bouncingball.BouncingBallProblem

Bases: otp.Problem

Parameters

class otp.bouncingball.BouncingBallParameters

Bases: otp.Parameters

Parameters for the bouncing ball problem.

Constructor Summary
BouncingBallParameters(varargin)

Create a bouncing ball parameters object.

Parameters:

varargin – A variable number of name-value pairs. A name can be any property of this class, and the subsequent value initializes that property.

Property Summary
Gravity

The magnitude of acceleration towards the ground.

Ground

A function defining the ground in terms of space.

GroundSlope

The slope (derivative) of the ground.

Presets

class otp.bouncingball.presets.RandomTerrain

Bases: otp.bouncingball.BouncingBallProblem

RANDOMTERRAIN Creates random terrain through the composition of sinusoidal functions.

class otp.bouncingball.presets.Parabola

Bases: otp.bouncingball.BouncingBallProblem

PARABOLA The ball bounces on a parabola, starting slightly off-center as to create an interesting trajectory.

class otp.bouncingball.presets.Canonical

Bases: otp.bouncingball.BouncingBallProblem

CANONICAL The ball has no horizontal velocity, and bounces on a perfectly flat surface.