kcc5
Class KCC_AtanTrap

Object
  extended by common:Generic
      extended by common:TrapShape
          extended by kcc5:KCC_AtanTrap

class 
TrapShape:KCC_AtanTrap

The Atan trap.

When this trap is used with the Orbit Traps Direct (UF5) coloring in dmj5.ucl, a Trap Threshold value of about 1250 is needed to produce a result similar to the Atan mode in Carlson Orbit Traps in kcc3.ucl.

For an example of what this trap looks like, click here.


Ultra Fractal Source

Toggle UF Source Code Display

 class KCC_AtanTrap( common.ulb:TrapShape ) {
 ; The Atan trap.
 ; <p>
 ; When this trap is used with the <em>Orbit Traps Direct (UF5)</em>
 ; coloring in dmj5.ucl, a Trap Threshold value of about 1250 is needed
 ; to produce a result similar to the Atan mode in <em>Carlson Orbit
 ; Traps</em> in kcc3.ucl.
 ; <p>
 ; For an example of what this trap looks like,
 ; <a href="../additional/kcc5/images/Atan Trap.jpg">click here</a>.
 ;
 public:
   import "common.ulb"
 
   ; constructor
   func KCC_AtanTrap( Generic pparent )
     TrapShape.TrapShape( pparent )
   endfunc
 
   ; call this before each sequence of values to be trapped
   func Init( complex pz )
     TrapShape.Init( pz )
     
     prev_z = pz
   endfunc
 
   ; call this for each iteration being trapped
   float func Iterate( complex pz )
     TrapShape.Iterate( pz )
 
     d = abs( real( pz ) )
     if( d > @maxReal )
       angle = abs( atan( ( imag( pz ) - imag( prev_z ) ) / ( real( pz ) - real( prev_z ) ) ) )
       
       m_LastChannel = m_Iterations
       m_Texture = angle
       return d
     else
       return 1e20
     endif
   endfunc
 
   float func GetTextureValue()
     return m_Texture
   endfunc
 
 protected:
   float d
   float angle
   complex prev_z
   float m_Texture
 
 default:
   title = "Atan Trap"
   
   int param v_KCC_AtanTrap
     caption = "Version (KCC_AtanTrap)"
     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_KCC_AtanTrap < 100
   endparam
 
   heading
     caption = "Information"
     text = "When this trap is used with the Orbit Traps Direct (UF5) \
             coloring in dmj5.ucl, a Trap Threshold value of about 1250 \
             is needed to produce a result similar to the Atan mode in \
             Carlson Orbit Traps in kcc3.ucl."
   endheading
 
   float param maxReal
     caption = "Max Z"
     default = 4.0
     hint = "Max value of real(z).  Suggested range (0.3 to 32.0)."
   endparam
 }
 


Constructor Summary
KCC_AtanTrap()
           
KCC_AtanTrap(Generic pparent)
          constructor
 
Method Summary
 float GetTextureValue()
          Get texture value.
 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, GetTransformedPoint, IterateSilent, SetThreshold
 
Methods inherited from class common:Generic
GetParent
 
Methods inherited from class Object
 

Constructor Detail

KCC_AtanTrap

public KCC_AtanTrap(Generic pparent)
constructor


KCC_AtanTrap

public KCC_AtanTrap()
Method Detail

Init

public void Init(complex pz)
call this before each sequence of values to be trapped

Overrides:
Init in class TrapShape

Iterate

public float Iterate(complex pz)
call this for each iteration being trapped

Overrides:
Iterate in class TrapShape

GetTextureValue

public float GetTextureValue()
Description copied from class: TrapShape
Get texture value.

Ordinarily, a trap shape does not have a native texture (it is flat). Some formulas may pair trap shapes with trap textures, and may need more information about trap textures when trap shapes are nested via TrapShapeMerge. This function provides support for accessing texture information.

Overrides:
GetTextureValue in class TrapShape
Returns:
the texture value for the last point used (i.e. call GetTextureValue() after calling Iterate(), not before)