[home]
Lagrange Applet Parameters



Name: Lagrange
Author: Peter Selinger
Version: 0.15
Documentation: http://www.mathstat.dal.ca/~selinger/lagrange/

The Lagrange Applet has eight general parameters that determine the basic functions of the applet. In addition, for each specific physical system (such as, a double pendulum) there is a set of parameters that determine the physical properties and initial condition of the system.

General Parameters

All parameters are optional. The default for each parameter is shown in bold face.

NamePossible ValuesDescription
typeDoublePendulum, SpringPendulum, DoubleSpring Physical system to be displayed.
framesa positive integer (10) Number of frames per second.
timefactora decimal fraction (1.0) Time factor for slow or fast motion.
tracetrue, false Draw a trace?
controlstrue, false Display a panel of control buttons?
showenergytrue, false Display the total energy?
constrainenergytrue, false Enforce energy preservation?
energycontroltrue, false Display button to toggle energy preservation?
deterministictrue, false Deterministic simulation?
bgcolor#xxxxxx (getBackground()) The background color.
fgcolor#xxxxxx (#000000) The foreground color.
tracecolor#xxxxxx (#ffffff) The color of the trace.
scalecolor#xxxxxx (#000000) The color of the metric scale.
timecolor#xxxxxx (#000000) The color of the time scale.
energycolor#xxxxxx (#000000) The color of the energy display.

Parameters for type = DoublePendulum

Each of the following parameters takes a value of type double.

NameDefaultDescription
m02inner mass, in kg
m13outer mass, in kg
l06inner length, in m
l14outer length, in m
g9.81gravity, in m/s^2
alpha2.2initial value for angle of inner leg, counterclockwise from south, in radians
alpha'0initial derivative for angle of inner leg, counterclockwise from south, in radians
beta3initial value for angle of outer leg, counterclockwise from south, in radians
beta'0initial derivative for angle of outer leg, counterclockwise from south, in radians

Parameters for type = DoubleSpring

NameDefaultDescription
m1mass, in kg
l01first spring length, in m
l11second spring length, in m
k05first spring constant, in N/m
k11second spring constant, in N/m
b1.9distance between pivot points, in m
g0gravity, in m/s^2
x1.2initial value for coordinate of mass, to right of midpoint of pivots, in m
x'0initial derivative for coordinate of mass, to right of midpoint of pivots, in m
y1initial value for coordinate of mass, above midpoint of pivots, in m
y'0initial derivative for coordinate of mass, above midpoint of pivots, in m

Parameters for type = SpringPendulum

NameDefaultDescription
m02inner mass, in kg
m11outer mass, in kg
l06inner length, in m
l14outer length, in m
k060spring constant, in N/m
g9.81gravity, in m/s^2
x2.2initial value for coordinate of inner mass, right of pivot, in m
x'0initial derivative for coordinate of inner mass, right of pivot, in m
y3initial value for coordinate of inner mass, above pivot, in m
y'0initial derivative for coordinate of inner mass, above pivot, in m
alpha1initial value for angle of outer leg, counterclockwise from south, in radians
alpha'0initial derivative for angle of outer leg, counterclockwise from south, in radians

A Sample Applet Tag

A typical applet tag for the Lagrange Applet might look like this:
<applet codebase=http://www.mathstat.dal.ca/~selinger/lagrange/codebase 
        code=Lagrange.class width=350 height=350>
 <param name=type value=DoublePendulum>
 <param name=frames value=10>
 <param name=trace value=true>
 <param name=controls value=true>
 <param name=bgcolor value=#ffffcc>
 <param name=fgcolor value=#000000>
 <param name=tracecolor value=#ff0000>
 <param name=scalecolor value=#0000ff>
</applet>

Back to main Lagrange page.
Back to Peter Selinger's Homepage: [home]
Peter Selinger / Department of Mathematics and Statistics / Dalhousie University
selinger@mathstat.dal.ca / PGP key
Updated May 12, 2000