Standard
Class Standard_TrapShapeRipples

Object
  extended by common:Generic
      extended by common:TrapShape
          extended by Standard:Standard_TrapShapeRipples

class 
TrapShape:Standard_TrapShapeRipples



Ultra Fractal Source

Toggle UF Source Code Display

 class Standard_TrapShapeRipples(common.ulb:TrapShape) {
 public:
   float func Iterate(complex pz)
     float d
     if @style == "Ring"
       d = cabs(pz)
       if d < @traporder
         d = cos(d * (@trapfreq*#pi)) * sqr(1-d/@traporder)
       else
         d = 0
       endif
     elseif @style == "Grid"
       d = cabs(pz)
       if d < @traporder
         d = (cos(real(pz)*(@trapfreq*#pi)) + cos(imag(pz)*(@trapfreq*#pi))) * sqr(1-d/@traporder) * 0.5
       else
         d = 0
       endif
     else ; Radial
       d = atan2(pz)
       float d2 = cabs(pz)
       if d2 < @traporder
         d = cos(4 * d * @trapfreq) * sqr(1-d2/@traporder)
       else
         d = 0
       endif
     endif
     return d
   endfunc
 default:
   title = "Ripples"
   int param style
     caption = "Style"
     enum = "Ring" "Grid" "Radial"
     default = 0
     hint = "Chooses between various types of ripples."
   endparam
   float param traporder
     caption = "Height"
     default = 4
     hint = "This is the height of the ripples."
   endparam
   float param trapfreq
     caption = "Frequency"
     default = 1
     hint = "This is the frequency of the ripples."
   endparam
 }
 


Constructor Summary
Standard_TrapShapeRipples()
           
 
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

Standard_TrapShapeRipples

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