dmj5
Class DMJ_TrapShapeRadialWave

Object
  extended by common:Generic
      extended by common:TrapShape
          extended by dmj5:DMJ_TrapShapeRadialWave

class 
TrapShape:DMJ_TrapShapeRadialWave



Ultra Fractal Source

Toggle UF Source Code Display

 class DMJ_TrapShapeRadialWave(common.ulb:TrapShape) {
 public:
   import "common.ulb"
 
   func DMJ_TrapShapeRadialWave(Generic pparent)
     TrapShape.TrapShape(pparent)
   endfunc
   
   float func Iterate(complex pz)
     TrapShape.Iterate(pz)
 
     float a = atan2(pz)
     float d = 0
     if (@p_merging == 0)
       d = cabs(pz) * (1 - \
         sin((a+@p_phase1*#pi/180)*@p_frequency1)*@p_amplitude1*0.5 - \
         sin((a+@p_phase2*#pi/180)*@p_frequency2)*@p_amplitude2*0.5)
     elseif (@p_merging == 1)
       d = cabs(pz) * (1 - \
         sin((a+@p_phase1*#pi/180)*@p_frequency1)*@p_amplitude1*0.5 * \
         sin((a+@p_phase2*#pi/180)*@p_frequency2)*@p_amplitude2*0.5)
     endif
     return d
   endfunc
   
 default:
   title = "Radial Wave"
 
   int param v_dmj_trapshaperadialwave
     caption = "Version (DMJ_TrapShapeRadialWave)"
     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_dmj_trapshaperadialwave < 100
   endparam
   
   int param p_merging
     caption = "Wave Merging"
     default = 0
     enum = "add" "multiply"
     hint = "Sets how the two frequency generators should be combined into a final wave."
   endparam
   float param p_amplitude1
     caption = "Amplitude 1"
     default = 1.0
     hint = "Sets one of the wave amplitudes. Higher amplitudes will result in higher peaks."
   endparam
   float param p_frequency1
     caption = "Frequency 1"
     default = 4.0
     visible = @p_amplitude1 != 0.0
     hint = "Sets one of the wave frequencies. Higher frequencies will result in more tightly-spaced peaks in the wave."
   endparam
   float param p_phase1
     caption = "Phase 1"
     default = 0.0
     visible = @p_amplitude1 != 0.0
     hint = "Sets the phase of one of the waves, in degrees."
   endparam
   float param p_amplitude2
     caption = "Amplitude 2"
     default = 0.0
     hint = "Sets one of the wave amplitudes. Higher amplitudes will result in higher peaks."
   endparam
   float param p_frequency2
     caption = "Frequency 2"
     default = 3.0
     visible = @p_amplitude2 != 0.0
     hint = "Sets one of the wave frequencies. Higher frequencies will result in more tightly-spaced peaks in the wave."
   endparam
   float param p_phase2
     caption = "Phase 2"
     default = 0.0
     visible = @p_amplitude2 != 0.0
     hint = "Sets the phase of one of the waves, in degrees."
   endparam
 }
 


Constructor Summary
DMJ_TrapShapeRadialWave()
           
DMJ_TrapShapeRadialWave(Generic pparent)
           
 
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

DMJ_TrapShapeRadialWave

public DMJ_TrapShapeRadialWave(Generic pparent)

DMJ_TrapShapeRadialWave

public DMJ_TrapShapeRadialWave()
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