dmj5
Class DMJ_LowRes

Object
  extended by common:Generic
      extended by common:Transform
          extended by common:UserTransform
              extended by dmj5:DMJ_LowRes

class 
UserTransform:DMJ_LowRes

Reduce resolution. (Ported from dmj.uxf:dmj-LowRes)


Ultra Fractal Source

Toggle UF Source Code Display

 class DMJ_LowRes(common.ulb:UserTransform) {
   ; Reduce resolution.
   ; (Ported from dmj.uxf:dmj-LowRes)
   
 public:
   import "common.ulb"
   
   func DMJ_LowRes(Generic pparent)
     UserTransform.UserTransform(pparent)
   endfunc
 
   complex func Iterate(complex pz)
     m_Iterations = m_Iterations + 1
 
     complex r = (0,1) ^ (@p_angle/90)  ; complex rotation vector
     pz = (round(real(pz*r)*@p_xres)/@p_xres + flip(round(imag(pz*r)*@p_yres)/@p_yres)) * conj(r)
 
     return pz
   endfunc
 
 protected:
 
 default:
   title = "Low Resolution"
 
   int param v_dmj_lowres
     caption = "Version (DMJ_LowRes)"
     default = 100
     hint = "This version parameter is used to detect when a change has been made to the formula that is incompatible with the previous version. When that happens, this field will reflect the old version number to alert you to the fact that an alternate rendering is being used."
     visible = @v_dmj_lowres < 100
   endparam
 
   float param p_xres
     caption = "Real Resolution"
     default = 25.0
     hint = "Number of separate positions per horizontal unit distance."
   endparam
   float param p_yres
     caption = "Imaginary Resolution"
     default = 25.0
     hint = "Number of separate positions per vertical unit distance."
   endparam
   float param p_angle
     caption = "Rotation angle"
     default = 0.0
     hint = "Sets the angle at which the low-resolution grid is applied."
   endparam
 }
 


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

DMJ_LowRes

public DMJ_LowRes(Generic pparent)

DMJ_LowRes

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