Standard
Class Standard_BinaryDecomposition

Object
  extended by common:Generic
      extended by common:Coloring
          extended by common:GradientColoring
              extended by Standard:Standard_BinaryDecomposition

class 
GradientColoring:Standard_BinaryDecomposition

Object version of BinaryDecomposition in Standard.ucl. Classic binary decomposition. Can give quite abstract effects. Use low bail-out values in the fractal formula (if possible) for best effects. This coloring algorithm uses just two colors from the gradient: one from the left end and one from the middle.


Ultra Fractal Source

Toggle UF Source Code Display

 class Standard_BinaryDecomposition(common.ulb:GradientColoring) {
 ;
 ; Object version of BinaryDecomposition in Standard.ucl.
 ;
 ; Classic binary decomposition. Can give quite abstract effects.
 ; Use low bail-out values in the fractal formula (if possible) for
 ; best effects. This coloring algorithm uses just two colors from
 ; the gradient: one from the left end and one from the middle.
 ;
 public:
   float func ResultIndex(complex pz)
     if @type == "Type 1"
       if real(pz) * imag(pz) >= 0
         return 0.5
       else
         return 0
       endif
     else
       if atan2(pz) > 0
         return 0.5
       else
         return 0
       endif
     endif
   endfunc
   
 default:
   title = "Binary Decomposition"
   helpfile = "Uf*.chm"
   helptopic = "Html/coloring/standard/binarydecomposition.html"
   param type
     caption = "Decomposition Type"
     enum = "Type 1" "Type 2"
     default = 0
     hint = "Toggles between two types of binary decomposition. Type 2 \
             reproduces the coloring used with many images in the classic \
             Beauty of Fractals book."
   endparam
 }
 


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

Constructor Detail

Standard_BinaryDecomposition

public Standard_BinaryDecomposition()
Method Detail

ResultIndex

public float ResultIndex(complex pz)
Description copied from class: GradientColoring
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:
ResultIndex in class GradientColoring
Returns:
the gradient index (corresponding to #index in a coloring formula)