Standard
Class Standard_Randomize

Object
  extended by common:Generic
      extended by common:Transform
          extended by common:UserTransform
              extended by Standard:Standard_Randomize

class 
UserTransform:Standard_Randomize

Implements the randomize option from the Gaussian Integer coloring algorithm in Standard.ucl. This applies a random factor. Originally written by Kerry Mitchell.


Ultra Fractal Source

Toggle UF Source Code Display

 class Standard_Randomize(common.ulb:UserTransform) {
 ;
 ; Implements the randomize option from the Gaussian Integer coloring algorithm
 ; in Standard.ucl. This applies a random factor.
 ;
 ; Originally written by Kerry Mitchell.
 ;
 public:
   func Init(complex pz)
     fLogFactor = @logseed
     m_Solid = false
   endfunc
   
   complex func Iterate(complex pz)
     fLogFactor = 4 * fLogFactor * (1 - fLogFactor)
     return pz * (1 - @randomsize * fLogFactor)
   endfunc
 
 private:
   complex fLogFactor
 
 default:
   title = "Randomize"
   param randomsize
     caption="Random Size"
     default=(0.1,0)
     hint="Specifies the size of the random factor to use. Larger values give \
           more randomization."
   endparam
   param logseed
     caption="Random Seed"
     default=0.1
     min=0.0
     max=1.0
     hint="Specifies the randomization seed, between 0 and 1. Every seed gives \
           a different image."
   endparam
 }
 


Constructor Summary
Standard_Randomize()
           
 
Method Summary
 void Init(complex pz)
          Set up for a sequence of values
 complex Iterate(complex pz)
          Transform a single point within a sequence
 
Methods inherited from class common:Transform
IsSolid, IterateSilent
 
Methods inherited from class common:Generic
GetParent
 
Methods inherited from class Object
 

Constructor Detail

Standard_Randomize

public Standard_Randomize()
Method Detail

Init

public void Init(complex pz)
Description copied from class: Transform
Set up for a sequence of values

This function will be called at the beginning of each sequence of values (e.g. at the beginning of each fractal orbit). It will be called even if only one value is being transformed (e.g. a normal transformation formula). Use this to perform any setup that is exactly the same for each value in the sequence being transformed.

Overrides:
Init in class Transform
Parameters:
pz - the value representing the sequence; for a normal transformation formula use, this will be #pixel. In some cases this may differ from the first value passed to Iterate() if the calling code applies some other transformations.

Iterate

public complex Iterate(complex pz)
Description copied from class: Transform
Transform a single point within a sequence

After a sequence has been set up with Init(), this function will be called once for each value in the sequence. Note that all values in the sequence must be processed in order (they cannot be processed out of order). If the sequence contains only one value, Init() will still be called and then Iterate() will be called just once.

Overrides:
Iterate in class Transform
Parameters:
pz - the complex value to be transformed
Returns:
the transformed value