Standard
Class Standard_Decomposition

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

class 
GradientColoring:Standard_Decomposition

Object version of Decomposition in Standard.ucl. Decomposes the angle of the Z variable after iteration and distributes it over the gradient. See also the Binary Decomposition coloring algorithm. Originally written by Damien M. Jones


Ultra Fractal Source

Toggle UF Source Code Display

 class Standard_Decomposition(common.ulb:GradientColoring) {
 ;
 ; Object version of Decomposition in Standard.ucl.
 ;
 ; Decomposes the angle of the Z variable after iteration and distributes it
 ; over the gradient. See also the Binary Decomposition coloring algorithm.
 ;
 ; Originally written by Damien M. Jones
 ;
 public:
   float func ResultIndex(complex pz)
     float d = atan2(pz)    ; get angle of z
     IF (d < 0)      ; it's negative
       d = d + #pi * 2    ; make it positive
     ENDIF
     return d / (#pi * 2)
   endfunc
 
 default:
   title = "Decomposition"
   helpfile = "Uf*.chm"
   helptopic = "Html/coloring/standard/decomposition.html"
 }
 


Constructor Summary
Standard_Decomposition()
           
 
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_Decomposition

public Standard_Decomposition()
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)