dmj5
Class DMJ_RectangularToPolar

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

class 
UserTransform:DMJ_RectangularToPolar

Convert rectangular coordinates to polar. (Ported from dmj.uxf:dmj-Unpolar)


Ultra Fractal Source

Toggle UF Source Code Display

 class DMJ_RectangularToPolar(common.ulb:UserTransform) {
   ; Convert rectangular coordinates to polar.
   ; (Ported from dmj.uxf:dmj-Unpolar)
   
 public:
   import "common.ulb"
   
   func DMJ_RectangularToPolar(Generic pparent)
     UserTransform.UserTransform(pparent)
   endfunc
 
   complex func Iterate(complex pz)
     m_Iterations = m_Iterations + 1
 
     pz = cabs(pz-@p_center) + flip(atan2(pz-@p_center))
 
     return pz
   endfunc
 
 protected:
 
 default:
   title = "Rectangular to Polar"
 
   int param v_dmj_rectangulartopolar
     caption = "Version (DMJ_RectangularToPolar)"
     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_rectangulartopolar < 100
   endparam
 
   complex param p_center
     caption = "Polar Center"
     default = (0,0)
     hint = "This is the center of the polar coordinate system."
   endparam
 }
 


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

public DMJ_RectangularToPolar(Generic pparent)

DMJ_RectangularToPolar

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