mmf
Class MMF_TrapShapeOrbitals

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

class 
MMF_TrapShapeZold:MMF_TrapShapeOrbitals

Traps the change in z or z-zold relative to z or z-zold.


Ultra Fractal Source

Toggle UF Source Code Display

 class MMF_TrapShapeOrbitals(MMF_TrapShapeZold) {
 ; Traps the change in z or z-zold relative to z or z-zold.<br>
 public:
   import "common.ulb"
 
   func MMF_TrapShapeOrbitals(Generic pparent)
     MMF_TrapShapeZold.MMF_TrapShapeZold(pparent)
   endfunc
   
   ; The recip(0) ensures that "no result" due to no zold or zolder
   ; returns a value outside the threshold<br>
   float func Iterate(complex pz)
     float r = recip(0)
 ;    m_Iterations = m_Iterations + 1 not used in this trapshape
     m_LastZ = pz
     if @type=="Divergent" && m_zoldok
       r = sqrt(|pz-m_zold|/|pz|)
     elseif m_zolderok
       if @type=="Convergent"
         r = sqrt(|pz-2.0*m_zold+m_zolder|/|pz-m_zold|)
       elseif @type=="Old Divergent"
         r = sqrt(|pz-m_zolder|/|pz|)
       endif
     endif
     m_zolder = m_zold
     m_zold = pz
     m_zolderok = m_zoldok
     m_zoldok = true
     return r
   endfunc
 
 default:
   title = "Orbitals"
   heading
     text = "Intended for use with 'MMF Smooth Orbit Traps (Gradient)' or \
             similar smoothing formulas since smoothing is often required."
   endheading
   int param type
     caption = "Orbital Type"
     enum = "Divergent" "Convergent" "Old Divergent"
     default = 0
     hint = "Divergent traps z to zold, Convergent traps z-zold to \
             zold-zolder, Old Divergent traps z to zolder. \
             All may work for any main formula whether it's \
             convergent or divergent."
   endparam
 }
 


Constructor Summary
MMF_TrapShapeOrbitals()
           
MMF_TrapShapeOrbitals(Generic pparent)
           
 
Method Summary
 float Iterate(complex pz)
          The recip(0) ensures that "no result" due to no zold or zolder returns a value outside the threshold
 
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_TrapShapeOrbitals

public MMF_TrapShapeOrbitals(Generic pparent)

MMF_TrapShapeOrbitals

public MMF_TrapShapeOrbitals()
Method Detail

Iterate

public float Iterate(complex pz)
The recip(0) ensures that "no result" due to no zold or zolder returns a value outside the threshold

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