mmf
Class MMF_CrossProduct

Object
  extended by common:Generic
      extended by common:Transform
          extended by common:UserTransform
              extended by mmf:MMF_TrapTransformZold
                  extended by mmf:MMF_CrossProduct

class 
MMF_TrapTransformZold:MMF_CrossProduct

Cross products involving z, zold and zolder


Ultra Fractal Source

Toggle UF Source Code Display

 class MMF_CrossProduct(MMF_TrapTransformZold) {
 ; Cross products involving z, zold and zolder<br>
 public:
   import "common.ulb"
 
   ; @param pparent the parent, generally "this" for the parent, or zero
   func MMF_CrossProduct(Generic pparent)
     MMF_TrapTransformZold.MMF_TrapTransformZold(pparent)
   endfunc
 
   func Init(complex pz)
 ;    m_Iterations = 0 not used in this transform
     m_Solid = false
     m_zold = m_zolder = pz
     m_zoldok = m_zolderok = false
   endfunc
 
   complex func Iterate(complex pz)
 ;    m_Iterations = m_Iterations + 1 not used in this transform
     complex z1 = pz
     if @p_mode=="Z and Zold" && m_zoldok
       z1 = real(pz)*imag(m_zold) - flip(real(m_zold)*imag(pz))
     elseif @p_mode=="Z and Zolder" && m_zolderok
       z1 = real(pz)*imag(m_zolder) - flip(real(m_zolder)*imag(pz))
     elseif @p_mode=="Z-Zold and Z-Zolder" && m_zoldok && m_zolderok
       complex z2 = pz - m_zolder
       z1 = pz - m_zold
       z1 = real(z1)*imag(z2) - flip(real(z2)*imag(z1))
     elseif @p_mode=="Z-Zold and Zold-Zolder" && m_zoldok && m_zolderok
       complex z2 = m_zold - m_zolder
       z1 = pz - m_zold
       z1 = real(z1)*imag(z2) - flip(real(z2)*imag(z1))
     endif
     m_zolder = m_zold
     m_zold = pz
     m_zolderok = m_zoldok
     m_zoldok = true
     return z1
   endfunc
 
 default:
   title = "Cross Product"
   heading
     text = "It may also be used in main formulas that allow iterative \
             transforms such as Switch Formula Transformations in mmf.ulb."
   endheading
   int param p_mode
     caption = "Vectors to Cross"
     enum = "Z and Zold" "Z and Zolder" "Z-Zold and Z-Zolder" \
            "Z-Zold and Zold-Zolder"
     default = 0
   endparam
 }
 


Constructor Summary
MMF_CrossProduct()
           
MMF_CrossProduct(Generic pparent)
           
 
Method Summary
 void Init(complex pz)
          Initialise m_zolder, m_zold, m_zolderok and m_zoldok
 complex Iterate(complex pz)
          Note that derived functions should update zold, zolder, zoldok and zolderok as necessary
 
Methods inherited from class mmf:MMF_TrapTransformZold
IterateSilent, IterateSilentZold
 
Methods inherited from class common:Transform
IsSolid
 
Methods inherited from class common:Generic
GetParent
 
Methods inherited from class Object
 

Constructor Detail

MMF_CrossProduct

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

MMF_CrossProduct

public MMF_CrossProduct()
Method Detail

Init

public void Init(complex pz)
Description copied from class: MMF_TrapTransformZold
Initialise m_zolder, m_zold, m_zolderok and m_zoldok

Overrides:
Init in class MMF_TrapTransformZold
Parameters:
pz - the z value

Iterate

public complex Iterate(complex pz)
Description copied from class: MMF_TrapTransformZold

Note that derived functions should update zold, zolder, zoldok and zolderok as necessary

Overrides:
Iterate in class MMF_TrapTransformZold
Parameters:
pz - the z value
Returns:
new z