ChaosPro Home
Introduction
What's New
Palettes
Using Formulas
Layering in ChaosPro
Rendering
Fractal Parameter Windows
Windows
Menu
3D Transformations
Animations
Formula Compiler
Writing Formulas
Language Reference
Introduction
Basic Syntax
Datatypes
Constants
Variables
Expressions
Operators
Functions
Control Structures
Compiler Directives
Functions
Interface to ChaosPro
Escapetime Formulas
Quaternion Formulas
Attractor Formulas
Libraries
How it works together
Description function
Special Features, Notes...
Compatibility
Fractal Type Reference
Tutorials
Appendix
CHAOSPRO 4.0
Release 4.0
.

Execution Sequence

Now you know transformations, formulas and colorings. But sometimes you wonder how they work together. When do functions get called? In what order?

The following short algorithm shows you how ChaosPro calculates a fractal:

call init_once of each transformation
call init_once of iteration formula
call init_once of inside coloring formula
call init_once of outside coloring formula
for y=0 to Height
   for x=0 to Width
      Calculate a new random number
      Set whitesq to 0 or 1, depending on the pixel.
      index=0
      initialize screenpixel, x and y
      solid=false
      Call transform function of each transformation
      if solid=false then
         Call init function of iteration formula
         Call init function of inside coloring formula
         Call init function of outside coloring formula
         Initialize oldz(0)
         numiter=0
         loop
            Call loop function of iteration formula
            if pixel bailed out then exit loop
            Call loop function of inside coloring
            Call loop function of outside coloring
            numiter=numiter+1
            Check if numiter is equal to maxiter: If yes, then  bail out
         end loop
         if maxit has been reached then
            Call final function of inside coloring
         else
            Call final function of outside coloring
         end if
      end if
      if solid=true then color the pixel using the solid color
      else color the pixel using the index variable
   next x
next y