Standard
Class Standard_Gradient

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

class 
GradientColoring:Standard_Gradient

Object version of Gradient in Standard.ucl. Shows the entire gradient in various ways. The fractal formula is ignored. Use zooming, panning and rotating to get the desired gradient. Make sure that Repeat Gradient is enabled.


Ultra Fractal Source

Toggle UF Source Code Display

 class Standard_Gradient(common.ulb:GradientColoring) {
 ;
 ; Object version of Gradient in Standard.ucl.
 ;
 ; Shows the entire gradient in various ways. The fractal formula
 ; is ignored. Use zooming, panning and rotating to get the desired
 ; gradient. Make sure that Repeat Gradient is enabled.
 ;
 public:
   float func ResultIndex(complex pz)
     complex ppixel = GetPixel()
     if @type == "Linear"
       return 16.5 + 0.25 * real(ppixel)
     elseif @type == "Radial"
       return 0.2 * |ppixel|
     else
       return 0.5 - atan2(ppixel) / (2 * #pi)
     endif
   endfunc
   
 default:
   title = "Gradient"
   helpfile = "Uf*.chm"
   helptopic = "Html/coloring/standard/gradient.html"
   param type
     caption = "Gradient Type"
     enum = "Linear" "Radial" "Cone"
     hint = "Specifies the shape of the gradient."
   endparam
 }
 


Constructor Summary
Standard_Gradient()
           
 
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_Gradient

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