Standard
Class Standard_Lake

Object
  extended by common:Generic
      extended by common:Transform
          extended by common:UserTransform
              extended by Standard:Standard_Lake

class 
UserTransform:Standard_Lake

Object version of Lake in Standard.uxf. Transforms the lower half of the layer so it appears to be submerged in rippling water. Originally written by Sylvie Gallet.


Ultra Fractal Source

Toggle UF Source Code Display

 class Standard_Lake(common.ulb:UserTransform) {
 ;
 ; Object version of Lake in Standard.uxf.
 ;
 ; Transforms the lower half of the layer so it appears to be submerged in
 ; rippling water.
 ;
 ; Originally written by Sylvie Gallet.
 ;
 public:
   complex func Iterate(complex pz)
     float ang
     float dy
     float y
 
     if (@use_sc)
       centr = #center
     else
       centr = @wl
     endif
 
     if (@use_la)
       ang = #angle
     else
       ang = @rot * #pi / 180
     endif
 
     if (ang != 0)
       pz = (pz - centr) * e^flip(-ang) + centr
     endif
     y = imag(pz)
     if (y < imag(centr))
       dy = imag(centr) - y
       y = 2 * imag(centr) - y
       y = y + @a * dy * sin (@f * dy^0.2)
       pz = real(pz) + flip(y)
     endif
     if (ang != 0)
       pz = (pz - centr) * e^flip(ang) + centr
     endif
     return pz
   endfunc
 
 default:
   title = "Lake"
   helpfile = "Uf*.chm"
   helptopic = "Html/transformations/standard/lake.html"
   complex param wl
     caption = "Water level"
     hint = "Selects the water level. Only the imaginary component is \
             actually used. Use the eyedropper to select this easily."
     default = #center
     enabled = !@use_sc
   endparam
   param use_sc
     caption = "Use screen center"
     hint = "If checked, the water level is always centered on the screen, \
             and the Center parameter is ignored."
     default = false
   endparam
   float param rot
     caption = "Rotation angle"
     default = (#angle * 180) / #pi
     hint = "Specifies the rotation of the water level in degrees. Use this \
             together with the Rotation angle parameter on the Location \
             tab to rotate the fractal instead of the water level."
     min = -360.0
     max = 360.0
     enabled = !@use_la
   endparam
   param use_la
     caption = "Use Location tab angle"
     default = false
     hint = "If checked, the rotation set on the Location tab is used \
             instead of the Rotation angle parameter."
   endparam
   param a
     caption = "Amplitude"
     default = 0.2
     hint = "Specifies the amplitude of the waves."
   endparam
   param f
     caption = "Frequency"
     default = 300.0
     min = 0.0
     hint = "Specifies the frequency of the waves."
   endparam
 }
 


Constructor Summary
Standard_Lake()
           
 
Method Summary
 complex Iterate(complex pz)
          Transform a single point within a sequence
 
Methods inherited from class common:Transform
Init, IsSolid, IterateSilent
 
Methods inherited from class common:Generic
GetParent
 
Methods inherited from class Object
 

Constructor Detail

Standard_Lake

public Standard_Lake()
Method Detail

Iterate

public complex Iterate(complex pz)
Description copied from class: Transform
Transform a single point within a sequence

After a sequence has been set up with Init(), this function will be called once for each value in the sequence. Note that all values in the sequence must be processed in order (they cannot be processed out of order). If the sequence contains only one value, Init() will still be called and then Iterate() will be called just once.

Overrides:
Iterate in class Transform
Parameters:
pz - the complex value to be transformed
Returns:
the transformed value