Standard
Class Standard_Aspect

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

class 
UserTransform:Standard_Aspect

Object version of Aspect in Standard.uxf. Changes the aspect ratio of the fractal. You can use this to create fractals for media with non-square pixels.


Ultra Fractal Source

Toggle UF Source Code Display

 class Standard_Aspect(common.ulb:UserTransform) {
 ;
 ; Object version of Aspect in Standard.uxf.
 ;
 ; Changes the aspect ratio of the fractal. You can use this to create fractals
 ; for media with non-square pixels.
 ;
 public:
   complex func Iterate(complex pz)
     complex result = pz * exp(flip(-#angle))
     float ratio = #height / (#width * @ar)
     if ratio < 1
       result = real(result) * ratio + flip(imag(result))
     else
       result = real(result) + flip(imag(result) / ratio)
     endif
     return result * exp(flip(#angle))
   endfunc
 
 default:
   title = "Aspect Ratio"
   helpfile = "Uf*.chm"
   helptopic = "Html/transformations/standard/aspectratio.html"
   param ar
     caption = "Aspect Ratio"
     default = 0.75
     min = 0.1
     max = 5
     exponential = true
     hint = "Set this to the final media aspect ratio (height/width). \
             The default value for computer monitors is 0.75, because \
             the height of most monitors is 0.75 times the width."
   endparam
 }
 


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

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