reb
Class ImageTrapModeStacked

Object
  extended by common:Generic
      extended by reb:ImageTrapMode
          extended by reb:ImageTrapModeWithThreshold
              extended by reb:ImageTrapModeStacked

class 
ImageTrapModeWithThreshold:ImageTrapModeStacked

trap mode variant based upon a class of Damien Jones


Ultra Fractal Source

Toggle UF Source Code Display

 class ImageTrapModeStacked(ImageTrapModeWithThreshold) {
 ; trap mode variant based upon a class of Damien Jones
 public:
   import "common.ulb"
 
   ; constructor
   func ImageTrapModeStacked(Generic pparent)
     ImageTrapModeWithThreshold.IMageTrapModeWithThreshold(pparent)
   endfunc
 
   ; initialize the object
   func Init(complex pz)
     ImageTrapModeWithThreshold.Init(pz)
 
     m_Solid = true
     int j = 0
     while (j < 4)
       m_Distances[j] = 1e20
       j = j + 1
     endwhile
   endfunc
 
   ; call for each iterated point
   func Iterate(complex pz, complex pzt, float pdistance, float ptexture, color pcolor)
     ImageTrapModeWithThreshold.Iterate(pz, pzt, pdistance,ptexture,pcolor)
     m_a = alpha(pcolor)
     float d2 = 0
     if (@p_trapstackorder == 0)
       d2 = m_Distances[0] - (m_Iterations-m_IterationPoints[0]) * @p_trapstackdistance * m_Threshold
     else
       d2 = m_Distances[0] + (m_Iterations-m_IterationPoints[0]) * @p_trapstackdistance * m_Threshold
     endif
     if (pdistance < d2 && pdistance < m_Threshold && m_a >= m_AThreshold)
       m_Distances[0] = pdistance
       m_UntransformedPoints[0] = pz
       m_Textures[0] = ptexture
       m_TransformedPoints[0] = pzt
       m_IterationPoints[0] = m_Iterations
       m_Solid = false
       m_ImagePoints[0] = pcolor
     endif
     edgefade(pdistance)
   endfunc
 
 default:
   title = "Stacked"
   int param v_stacked
     caption = "Version (Stacked)"
     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_stacked < 100
   endparam
   int param p_trapstackorder
     caption = "Stack Order"
     default = 0
     enum = "top-down" "bottom-up"
     hint = "Sets the order in which traps are stacked. Top-down places earlier iterations above later iterations; bottom-up places later iterations above earlier iterations."
   endparam
   float param p_trapstackdistance
     caption = "Stack Distance"
     default = 0.25
     min = 0.0
     hint = "Amount trap distance varies with each iteration. Use this to adjust how close together traps appear and intertwine with each other."
   endparam
 }
 


Constructor Summary
ImageTrapModeStacked()
           
ImageTrapModeStacked(Generic pparent)
          constructor
 
Method Summary
 void Init(complex pz)
          initialize the object
 void Iterate(complex pz, complex pzt, float pdistance, float ptexture, color pcolor)
          call for each iterated point
 
Methods inherited from class reb:ImageTrapModeWithThreshold
EdgeFade, GetAThreshold, GetThreshold, SetAThreshold, SetThreshold, UsesAThreshold, UsesThreshold
 
Methods inherited from class reb:ImageTrapMode
GetColor, GetDistance, GetIteration, GetTexture, GetTransformedPoint, GetUntransformedPoint, IsSolid, IterateSilent, Result
 
Methods inherited from class common:Generic
GetParent
 
Methods inherited from class Object
 

Constructor Detail

ImageTrapModeStacked

public ImageTrapModeStacked(Generic pparent)
constructor


ImageTrapModeStacked

public ImageTrapModeStacked()
Method Detail

Init

public void Init(complex pz)
initialize the object

Overrides:
Init in class ImageTrapMode

Iterate

public void Iterate(complex pz,
                    complex pzt,
                    float pdistance,
                    float ptexture,
                    color pcolor)
call for each iterated point

Overrides:
Iterate in class ImageTrapMode