Class Scalemap
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Window
|
+----java.awt.Frame
|
+----ChaosDemos.dynamicGraph
|
+----Scalemap
- public class Scalemap
- extends dynamicGraph
Iterates and plots the quadratic and sine maps, and demonstrates
functional composition and rescaling.
Uses the "Java Graph Class Library" by Leigh Brrokshaw
- Version:
- 3 August, 1997
- Author:
- Michael Cross
-
a
- map parameter
-
atext
- string value of a: used because of string truncation
-
buttons
-
-
delay
- sleep delay in ms in dynamic iteration
-
f
- iterate of x
-
iterateCurve
- index of iteration curve
-
ncurve
- number of curves
-
nf
- compositions -> nit
-
nfun
- function: 0=Quadratic; 1=Sine
-
nit
- nit = 2^nf -> functional composition
-
np
- Number of points in plot of f(x)
-
nsc
- scaling factor: f and x are rescaled by (-alpha)^nsc
-
trans
- iterations to eliminate transients
-
x
- map variable
-
x0
- starting value of x
-
xmin
- initial value of x - scale
-
xscale
- rescaled value of x- scale
-
Scalemap(startMap)
-
-
disableAll()
- Disables text input and choice contorls
-
enableAll()
- Enables text input and choice contorls
-
function(int)
- Returns map function of class variable x
-
handleEvent(Event)
- Event handler:
Stops iteration on minimising and handles close window event
(May fail under Windows95)
-
iterate()
- Iterates class variables via map functions x->f f->f(x)
-
movieStart()
- Start movie thread
-
movieStop()
- Stop movie thread
-
respondToButtons(int)
- Respond to buttonControls
-
respondToMouse(double, boolean, double, boolean)
- Restarts iteration on mouse click
-
respondToText()
- Responds to textControls
-
restart()
- Resets plot by deleting all curves and restarting
-
seta(double, int)
- Resets the parameter a and function number.
-
stop()
- Stop thread
-
updateParameters()
- Updates parameters from the text controls
np
int np
- Number of points in plot of f(x)
nit
int nit
- nit = 2^nf -> functional composition
ncurve
int ncurve
- number of curves
iterateCurve
int iterateCurve
- index of iteration curve
trans
int trans
- iterations to eliminate transients
nf
int nf
- compositions -> nit
nsc
int nsc
- scaling factor: f and x are rescaled by (-alpha)^nsc
delay
int delay
- sleep delay in ms in dynamic iteration
nfun
int nfun
- function: 0=Quadratic; 1=Sine
x
double x
- map variable
f
double f
- iterate of x
a
double a
- map parameter
atext
String atext
- string value of a: used because of string truncation
xmin
double xmin
- initial value of x - scale
xscale
double xscale
- rescaled value of x- scale
x0
double x0
- starting value of x
buttons
buttonControls buttons
Scalemap
Scalemap(startMap target)
- Parameters:
- target - starting class
- See Also:
- startMap
respondToButtons
public void respondToButtons(int buttonIndex)
- Respond to buttonControls
- Parameters:
- buttonIndex - index of button pushed
- Overrides:
- respondToButtons in class dynamicGraph
- See Also:
- buttonControls
respondToText
public void respondToText()
- Responds to textControls
- Overrides:
- respondToText in class dynamicGraph
- See Also:
- textControls
movieStop
public void movieStop()
- Stop movie thread
movieStart
public void movieStart()
- Start movie thread
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
disableAll
public void disableAll()
- Disables text input and choice contorls
enableAll
public void enableAll()
- Enables text input and choice contorls
seta
public void seta(double ain,
int n)
- Resets the parameter a and function number. Stores atext
for later comparison (because string truncates accuracy of double)
function
public double function(int n)
- Returns map function of class variable x
- Parameters:
- n - number of iterations
updateParameters
public void updateParameters()
- Updates parameters from the text controls
restart
public void restart()
- Resets plot by deleting all curves and restarting
iterate
public boolean iterate()
- Iterates class variables via map functions x->f f->f(x)
- Overrides:
- iterate in class dynamicGraph
stop
public void stop()
- Stop thread
respondToMouse
public void respondToMouse(double xcoord,
boolean xcoordValid,
double ycoord,
boolean ycoordValid)
- Restarts iteration on mouse click
- Parameters:
- xcoord - x-coordinate of event
- xcoordValid - true if event within x-range set by axes
- ycoord - y-coordinate of event
- ycoordValid - true if event within y-range set by axes
- Overrides:
- respondToMouse in class dynamicGraph