Class Lorenz

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Window
                           |
                           +----java.awt.Frame
                                   |
                                   +----ChaosDemos.dynamicGraph
                                           |
                                           +----Lorenz

public class Lorenz
extends dynamicGraph
Iterates and plots the Lorenz model
Uses the "Java Graph Class Library" by Leigh Brookshaw

Version:
3 August, 1997
Author:
Michael Cross

Variable Index

 o a
parameter of equations
 o axisLabel
axis labels
 o b
parameter of equations
 o c
parameter of equations
 o curve2
true if second trace to be plotted
 o delay
delay in graph update , and factor reducing time step
 o dt
time step (after reduction by delay)
 o dtp
input time step
 o dx
perturbation for second trace
 o err
error estimates from ode solver
 o errp
error estimates from ode solver
 o ncurve
number of curves
 o ncurve1
index of first data curve
 o ncurve2
index of second data curve
 o ntrans
number of iterations to eliminate transient = trans/dt
 o nVariables
number of variables (icluding time)
 o plot_x
variable to be plotted on x-axis
 o plot_y
variable to be plotted on y-axis
 o runTrans
true if transient is to be run on call to restart()
 o showTime
true if time to be shown.
 o t
evolving time
 o trans
transient time
 o transientColor
Color of ghost
 o x
evolving variables
 o x0
starting values of x

Constructor Index

 o Lorenz(startLor)

Method Index

 o derivs(double[], double, int)
Returns RHS of differential equations for Lorenz model
 o disableAll()
Disables text input and choice controls
 o enableAll()
Enables text input and choice contorls
 o handleEvent(Event)
Event handler: Stops iteration on minimising and handles close window event
(May fail under Windows95)
 o iterate()
Iterates Lorenz equations and updates graph
 o movieStart()
Start movie thread
 o movieStop()
Stop movie thread
 o respondToButtons(int)
Respond to buttonControls
 o respondToChoices()
Responds to choiceControls
 o respondToText()
Responds to textControls
 o restart()
Resets plot by deleting all curves and restarting
 o stop()
Stop movie thread
 o updateParameters()
Updates parameters from the text controls
 o updateSpeed(int)

Variables

 o ncurve
 int ncurve
number of curves

 o ncurve1
 int ncurve1
index of first data curve

 o ncurve2
 int ncurve2
index of second data curve

 o plot_x
 int plot_x
variable to be plotted on x-axis

 o plot_y
 int plot_y
variable to be plotted on y-axis

 o delay
 int delay
delay in graph update , and factor reducing time step

 o ntrans
 int ntrans
number of iterations to eliminate transient = trans/dt

 o trans
 double trans
transient time

 o nVariables
 int nVariables
number of variables (icluding time)

 o runTrans
 boolean runTrans
true if transient is to be run on call to restart()

 o showTime
 boolean showTime
true if time to be shown. Set by choices

 o curve2
 boolean curve2
true if second trace to be plotted

 o dt
 double dt
time step (after reduction by delay)

 o dtp
 double dtp
input time step

 o t
 double t
evolving time

 o x
 double x[]
evolving variables

 o x0
 double x0[]
starting values of x

 o dx
 double dx[]
perturbation for second trace

 o a
 double a
parameter of equations

 o b
 double b
parameter of equations

 o c
 double c
parameter of equations

 o err
 double err
error estimates from ode solver

 o errp
 double errp
error estimates from ode solver

 o transientColor
 Color transientColor
Color of ghost

 o axisLabel
 String axisLabel[]
axis labels

Constructors

 o Lorenz
 Lorenz(startLor target)
Parameters:
target - starting class
See Also:
startLor

Methods

 o respondToText
 public void respondToText()
Responds to textControls

Overrides:
respondToText in class dynamicGraph
See Also:
textControls
 o respondToChoices
 public void respondToChoices()
Responds to choiceControls

Overrides:
respondToChoices in class dynamicGraph
See Also:
choiceControls
 o respondToButtons
 public void respondToButtons(int buttonIndex)
Respond to buttonControls

Parameters:
buttonIndex - index of button pushed
Overrides:
respondToButtons in class dynamicGraph
See Also:
buttonControls
 o movieStop
 public void movieStop()
Stop movie thread

 o movieStart
 public void movieStart()
Start movie thread

 o handleEvent
 public boolean handleEvent(Event evt)
Event handler: Stops iteration on minimising and handles close window event
(May fail under Windows95)

Overrides:
handleEvent in class Component
 o disableAll
 public void disableAll()
Disables text input and choice controls

 o enableAll
 public void enableAll()
Enables text input and choice contorls

 o derivs
 public double[] derivs(double x[],
                        double t,
                        int n)
Returns RHS of differential equations for Lorenz model

Parameters:
x[] - vector of current value of dependent variables
n - number of dependent variables in array x[]
t - current value of independent variable
Returns:
n compoent vector giving derivatives of dependent variables
Overrides:
derivs in class dynamicGraph
 o updateParameters
 public void updateParameters()
Updates parameters from the text controls

 o restart
 public boolean restart()
Resets plot by deleting all curves and restarting

 o iterate
 public boolean iterate()
Iterates Lorenz equations and updates graph

Overrides:
iterate in class dynamicGraph
 o stop
 public void stop()
Stop movie thread

 o updateSpeed
 public void updateSpeed(int in_delay)
Overrides:
updateSpeed in class dynamicGraph