dmj5
Class DMJ_TrapShapeGridRipples

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

class 
TrapShape:DMJ_TrapShapeGridRipples



Ultra Fractal Source

Toggle UF Source Code Display

 class DMJ_TrapShapeGridRipples(common.ulb:TrapShape) {
 public:
   import "common.ulb"
 
   func DMJ_TrapShapeGridRipples(Generic pparent)
     TrapShape.TrapShape(pparent)
   endfunc
   
   float func Iterate(complex pz)
     TrapShape.Iterate(pz)
 
     float d = 0
     if (@p_diagonal == 0)
       if (@p_merging == 0)
         d = (cos((real(pz)+@p_phase1*#pi/180)*@p_frequency1)*@p_amplitude1 + \
            cos((real(pz)+@p_phase2*#pi/180)*@p_frequency2)*@p_amplitude2) + \
           (cos((imag(pz)+@p_phase1*#pi/180)*@p_frequency1)*@p_amplitude1 + \
            cos((imag(pz)+@p_phase2*#pi/180)*@p_frequency2)*@p_amplitude2)
       elseif (@p_merging == 1)
         d = (cos((real(pz)+@p_phase1*#pi/180)*@p_frequency1)*@p_amplitude1 * \
            cos((real(pz)+@p_phase2*#pi/180)*@p_frequency2)*@p_amplitude2) + \
           (cos((imag(pz)+@p_phase1*#pi/180)*@p_frequency1)*@p_amplitude1 * \
            cos((imag(pz)+@p_phase2*#pi/180)*@p_frequency2)*@p_amplitude2)
       endif
 
     elseif (@p_diagonal == 1)
       if (@p_merging == 0)
         d = (cos((real(pz)+@p_phase1*#pi/180)*@p_frequency1)*@p_amplitude1 + \
            cos((real(pz)+@p_phase2*#pi/180)*@p_frequency2)*@p_amplitude2) * \
           (cos((imag(pz)+@p_phase1*#pi/180)*@p_frequency1)*@p_amplitude1 + \
            cos((imag(pz)+@p_phase2*#pi/180)*@p_frequency2)*@p_amplitude2)
       elseif (@p_merging == 1)
         d = (cos((real(pz)+@p_phase1*#pi/180)*@p_frequency1)*@p_amplitude1 * \
            cos((real(pz)+@p_phase2*#pi/180)*@p_frequency2)*@p_amplitude2) * \
           (cos((imag(pz)+@p_phase1*#pi/180)*@p_frequency1)*@p_amplitude1 * \
            cos((imag(pz)+@p_phase2*#pi/180)*@p_frequency2)*@p_amplitude2)
       endif
 
     endif
     return d
   endfunc
   
 default:
   title = "Grid Ripples"
 
   int param v_dmj_trapshapegridripples
     caption = "Version (DMJ_TrapShapeGridRipples)"
     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_trapshapegridripples < 100
   endparam
   
   int param p_diagonal
     caption = "Ripple Style"
     default = 0
     enum = "add" "multiply"
     hint = "Sets how the waves from horizontal and vertical components interact."
   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 = 1.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_TrapShapeGridRipples()
           
DMJ_TrapShapeGridRipples(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_TrapShapeGridRipples

public DMJ_TrapShapeGridRipples(Generic pparent)

DMJ_TrapShapeGridRipples

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