Sprite |
Lorenz |
Draws a series of colored circles with position and size based on the Lorenz attractor formulas.
The formula is based on the formula given in Flash Math v2, Ch8 Tarbell 2 Lorenz Attractors, but the implementation is a separate extended, colorized recoding in ActionScript 3.
Lorenz | Draws a series of colored circles with position and size based on the Lorenz attractor formulas. |
Private positional members | |
x0 | Position in x. |
y0 | Position in y. |
z0 | Position in z. |
Private Lorenz constants | |
timer | Timer used when animating the drawing of the circles. |
count | Counter used to re-randomize the drawing to vary the look. |
Lorenz | Creates a series of colored circle shapes that are added to the instance sprite. |
update | Removes the first circle and adds a new. |
start | Start animating the shape. |
stop | Stop animating the shape. |
timerHandler | Handles the timer callback and forces a display update. |
initialize | Randomizes the positional values. |
generate | Creates a few circles with the next color in the color palette. |
calculate | Calculates the next x0, y0, z0 values based on their current values. |
randomize | Pseudo-randomizes the random numbers returned from Math.random based on the position of the mouse. |
Position in x.
private var x0: Number
Position in y.
private var y0: Number
Position in z.
private var z0: Number
Timer used when animating the drawing of the circles.
private var timer: Timer
Counter used to re-randomize the drawing to vary the look.
private var count: uint
Creates a series of colored circle shapes that are added to the instance sprite.
public function Lorenz( children: uint = 64 )
Removes the first circle and adds a new.
public function update():void
Start animating the shape.
public function start( interval: uint = 1000 ):void
Stop animating the shape.
public function stop():void
Handles the timer callback and forces a display update.
private function timerHandler( event: TimerEvent ):void
Randomizes the positional values.
private function initialize():void
Creates a few circles with the next color in the color palette.
private function generate():Shape
Calculates the next x0, y0, z0 values based on their current values.
private function calculate():void
Pseudo-randomizes the random numbers returned from Math.random based on the position of the mouse.
private function randomize():Number