mt
Class MT_GnarlTexture

Object
  extended by common:Generic
      extended by common:TrapShape
          extended by mt:MT_GnarlTexture

class 
TrapShape:MT_GnarlTexture

Mark Townsend, May 2008


Ultra Fractal Source

Toggle UF Source Code Display

 class MT_GnarlTexture(common.ulb:TrapShape) {
 ;
 ; Mark Townsend, May 2008
 ;
 public:
   float func Iterate(complex pz)
     int i = 0
     float x = real(pz)
     float y = imag(pz)
     while i < @max_iterations
       float xx = x
       x = x - @h * real(@fn1(y + @fn2(@a * (y + @fn3(@b * y)))))
       y = y + @h * real(@fn1(xx + @fn2(@a * (xx + @fn3(@b * xx)))))
       i = i + 1
     endwhile
     m_LastZ = x + flip(y)
     return cabs(pz - m_LastZ)
   endfunc
   
 default:
   title = "Gnarl Texture"
   param a
     caption = "Alpha"
     default = 3.0
   endparam
   param b
     caption = "Beta"
     default = 3.0
   endparam
   param h
     caption = "Step Size"
     default = 0.05
     hint = "This is step size for the Gnarl formula."
   endparam
   param max_iterations
     caption = "Iterations"
     default = 3
     min = 1
     hint = "This is the number of iterations for the \
             Gnarl formula."
   endparam
   func fn1
     caption = "First Function"
     default = sin()
   endfunc
   func fn2
     caption = "Second Function"
     default = sin()
   endfunc
   func fn3
     caption = "Third Function"
     default = sin()
   endfunc
 }
 


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

Constructor Detail

MT_GnarlTexture

public MT_GnarlTexture()
Method Detail

Iterate

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

Overrides:
Iterate in class TrapShape