mt
Class MT_TurbulenceTexture

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

class 
TrapShape:MT_TurbulenceTexture

Mark Townsend, May 2008


Ultra Fractal Source

Toggle UF Source Code Display

 class MT_TurbulenceTexture(common.ulb:TrapShape) {
 ;
 ; Mark Townsend, May 2008
 ;
 public:
   func MT_TurbulenceTexture(Generic pparent)
     TrapShape.TrapShape(pparent)
     fTurbulence = new @p_turbulence(this)
     fPattern = new @p_pattern(this)
   endfunc
   
   func Init(complex pz)
     fTurbulence.Init(pz)
     fPattern.Init(pz)
   endfunc
 
   float func Iterate(complex pz)
     TrapShape.Iterate(pz)
     float a = fTurbulence.Iterate(pz)
     complex p = pz + exp(flip(2 * #pi * sqrt(2) * a)) * @strength
     a = fPattern.Iterate(p)
     m_LastZ = fPattern.GetTransformedPoint()
     return a
   endfunc
 
 private:
   TrapShape fTurbulence
   TrapShape fPattern
 
 default:
   title = "Turbulence Texture"
   TrapShape param p_pattern
     caption = "Pattern"
     default = MT_PerlinNoiseTexture
   endparam
   TrapShape param p_turbulence
     caption = "Turbulence"
     default = MT_PerlinNoiseTexture
   endparam
   float param strength
     caption = "Strength"
     default = 0.2
   endparam
 }
 


Constructor Summary
MT_TurbulenceTexture()
           
MT_TurbulenceTexture(Generic pparent)
           
 
Method Summary
 void Init(complex pz)
          call this before each sequence of values to be trapped
 float Iterate(complex pz)
          call this for each iteration being trapped
 
Methods inherited from class common:TrapShape
GetColorChannel, GetTextureValue, GetTransformedPoint, IterateSilent, SetThreshold
 
Methods inherited from class common:Generic
GetParent
 
Methods inherited from class Object
 

Constructor Detail

MT_TurbulenceTexture

public MT_TurbulenceTexture(Generic pparent)

MT_TurbulenceTexture

public MT_TurbulenceTexture()
Method Detail

Init

public void Init(complex pz)
Description copied from class: TrapShape
call this before each sequence of values to be trapped

Overrides:
Init in class TrapShape

Iterate

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

Overrides:
Iterate in class TrapShape