mmf
Class MMF_SelfRotation

Object
  extended by common:Generic
      extended by common:Transform
          extended by common:UserTransform
              extended by mmf:MMF_SelfRotation

class 
UserTransform:MMF_SelfRotation

Rotates the complex value by multiples of its own angle.


Ultra Fractal Source

Toggle UF Source Code Display

 class MMF_SelfRotation(common.ulb:UserTransform) {
 ; Rotates the complex value by multiples of its own angle.<br>
 public:
   import "common.ulb"
   
   ; @param pparent the parent, generally "this" for the parent, or zero
   func MMF_SelfRotation(Generic pparent)
     UserTransform.UserTransform(pparent)
   endfunc
 
   complex func Iterate(complex pz)
 ;    m_Iterations = m_Iterations + 1 not used in this transform
     if pz!=(0,0)
       float m = cabs(pz)
       if @degree==(1,0)
         pz = sqr(pz)/m
       else
         pz = pz^(@degree+1.0)/m^@degree
       endif
     endif
     return pz
   endfunc
 
 default:
   title = "Self Rotation"
   complex param degree
     caption = "Degree of rotation"
     default = (1,0)
     hint = "The larger the value, the more rotation involved. Using 1.0 \
             means that the z value is rotated by its own angle, using \
             2.0 means that it's rotated by twice its own angle, 3.0 by \
             three times and so on. Values less than 1, non-integer values, \
             negative values, imaginary values etc. will produce strange \
             results, not that results aren't strange anyway - in \
             particular when self-rotation is applied the chance of \
             Strangely Attractive orbits is increased :)"
   endparam
 }
 


Constructor Summary
MMF_SelfRotation()
           
MMF_SelfRotation(Generic pparent)
           
 
Method Summary
 complex Iterate(complex pz)
          Transform a single point within a sequence
 
Methods inherited from class common:Transform
Init, IsSolid, IterateSilent
 
Methods inherited from class common:Generic
GetParent
 
Methods inherited from class Object
 

Constructor Detail

MMF_SelfRotation

public MMF_SelfRotation(Generic pparent)
Parameters:
pparent - the parent, generally "this" for the parent, or zero

MMF_SelfRotation

public MMF_SelfRotation()
Method Detail

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