ck
Class Basic

Object
  extended by common:Generic
      extended by common:Coloring
          extended by common:DirectColoring
              extended by ck:Basic

class 
DirectColoring:Basic

Object version of Basic in Standard.ucl. Four basic and classic ways to color a fractal. Other classic algorithms are Decomposition, Binary Decomposition, and Distance Estimator.


Ultra Fractal Source

Toggle UF Source Code Display

 class Basic(common.ulb:DirectColoring) {
 ;
 ; Object version of Basic in Standard.ucl.
 ;
 ; Four basic and classic ways to color a fractal. Other classic
 ; algorithms are Decomposition, Binary Decomposition, and
 ; Distance Estimator.
 ;
 $define DEBUG
 public:
   color func Result(complex pz)
   float res=0;
     if @type == "Iteration"
       res = (m_Iterations/#maxiter)
     elseif @type == "Real"
       res =   (@bailout + real(pz))/@bailout*2
     elseif @type == "Imaginary"
       res=  (@bailout + imag(pz))/ @bailout*2
     else
       res=  (@bailout + real(pz) + imag(pz))/@bailout*2
     endif
           print(res)
     return (@_color1*res)+rgba(0,0,0,1)
     
   endfunc
 
 default:
   title = "Basic Direct"
   helpfile = "Uf*.chm"
   helptopic = "Html/coloring/standard/basic.html"
   param type
     caption = "Coloring Type"
     enum = "Iteration" "Real" "Imaginary" "Sum"
     hint = "Specifies how the fractal is colored. Most options work best \
             with low bail-out values for the fractal formula, like 4. \
             The Iteration option is the classic way to color fractals."
   endparam
   color param _color1
     caption = "Color 1"
   endparam
   float param bailout
     caption = "Bailout"
     default= 4
   endparam
 }
 


Constructor Summary
Basic()
           
 
Method Summary
 color Result(complex pz)
          Produce a resulting color index after a sequence is finished
 
Methods inherited from class common:DirectColoring
Init, IsSolid, Iterate
 
Methods inherited from class common:Coloring
GetPixel, IsGradient
 
Methods inherited from class common:Generic
GetParent
 
Methods inherited from class Object
 

Constructor Detail

Basic

public Basic()
Method Detail

Result

public color Result(complex pz)
Description copied from class: DirectColoring
Produce a resulting color index after a sequence is finished

This corresponds to the final: section in a coloring formula. Once it is called, no further calls to Iterate() should be made without calling Init() first.

Overrides:
Result in class DirectColoring
Returns:
the gradient index (corresponding to #index in a coloring formula)