mmf
Class MMF_TrapShapeSimpleVergence

Object
  extended by common:Generic
      extended by common:TrapShape
          extended by mmf:MMF_TrapShapeZold
              extended by mmf:MMF_TrapShapeSimpleVergence

class 
MMF_TrapShapeZold:MMF_TrapShapeSimpleVergence

Trap the divergence or convergence in the orbit.


Ultra Fractal Source

Toggle UF Source Code Display

 class MMF_TrapShapeSimpleVergence(MMF_TrapShapeZold) {
 ; Trap the divergence or convergence in the orbit.<br>
 public:
   import "common.ulb"
 
   func MMF_TrapShapeSimpleVergence(Generic pparent)
     MMF_TrapShapeZold.MMF_TrapShapeZold(pparent)
   endfunc
   
   float func Iterate(complex pz)
     float r = recip(0) ; ensures that "no result" due to no zold or zolder
                        ; returns a value outside the threshold
 ;    m_Iterations = m_Iterations + 1 not used in this trapshape
     m_LastZ = pz
     if @type=="Divergence" && m_zoldok
       r = cabs(log(pz)/log(m_zold))
     elseif @type=="Convergence" && m_zolderok
       r = cabs(log(pz-m_zold)/log(m_zold-m_zolder))
     endif
     m_zolder = m_zold
     m_zold = pz
     m_zolderok = m_zoldok
     m_zoldok = true
     return r
   endfunc
 
 default:
   title = "Simple 'Vergence"
   int param type
     caption = "Type of 'Vergence"
     enum = "Divergence" "Convergence"
     default = 0
     hint = "Divergence uses log(z)/log(zold), Convergence uses \
             log(z-zold)/log(zold-zolder). Either type should \
             work on any fractal whether convergent or divergent."
   endparam
 }
 


Constructor Summary
MMF_TrapShapeSimpleVergence()
           
MMF_TrapShapeSimpleVergence(Generic pparent)
           
 
Method Summary
 float Iterate(complex pz)
          call this for each iteration being trapped
 
Methods inherited from class mmf:MMF_TrapShapeZold
Init, IterateSilent, IterateSilentZold
 
Methods inherited from class common:TrapShape
GetColorChannel, GetTextureValue, GetTransformedPoint, SetThreshold
 
Methods inherited from class common:Generic
GetParent
 
Methods inherited from class Object
 

Constructor Detail

MMF_TrapShapeSimpleVergence

public MMF_TrapShapeSimpleVergence(Generic pparent)

MMF_TrapShapeSimpleVergence

public MMF_TrapShapeSimpleVergence()
Method Detail

Iterate

public float Iterate(complex pz)
Description copied from class: MMF_TrapShapeZold
call this for each iteration being trapped

It's up to the derived function to copy zold to zolder and pz to zold after using the values of zolder, zold and pz (without modifying them obviously).

And to (finally) copy zoldok to zolderok and set zoldok to true.

Note that if there's no result (due to no zold or zolder) then the function could return +infinity as the value to ensure the value is outside any threshold.

Overrides:
Iterate in class MMF_TrapShapeZold
Parameters:
pz - the z value
Returns:
trap distance