Standard Class Standard_PhoenixMandel

Object common:Generic common:Formula common:DivergentFormula Standard:Standard_PhoenixMandel

class
DivergentFormula:Standard_PhoenixMandel

Object version of PhoenixMandel in Standard.ufm. Mandelbrot variant of the Phoenix fractal type discovered by Shigehiro Ushiki. The general equation is of the form z(n+1) = z(n)^a + c*z(n)^b + p*z(n-1) If a=2 and b=0 (classic Phoenix) then this type will work with the Smooth and Triangle Inequality coloring algorithms. Originally written by Damien M. Jones

Ultra Fractal Source
class Standard_PhoenixMandel(common.ulb:DivergentFormula) {
;
; Object version of PhoenixMandel in Standard.ufm.
;
; Mandelbrot variant of the Phoenix fractal type discovered by
; Shigehiro Ushiki. The general equation is of the form
;
;     z(n+1) = z(n)^a + c*z(n)^b + p*z(n-1)
;
; If a=2 and b=0 (classic Phoenix) then this type will
; work with the Smooth and Triangle Inequality coloring
; algorithms.
;
; Originally written by Damien M. Jones
;
public:
complex func Init(complex pz)
fY = (0, 0)
fPixel = pz
if (@start == (0,0)); bug in beta 5
return pz
else
return @start
endif
endfunc

complex func Iterate(complex pz)
complex newz = pz^@p_power + pz^@power2 * fPixel + @induct * fY
fY = pz
return newz
endfunc

private:
complex fPixel
complex fY

default:
title = "Phoenix (Mandelbrot)"
helpfile = "Uf*.chm"
helptopic = "Html/formulas/standard/phoenix.html"
rating = recommended
param start
caption = "Start Value"
default = (0,0)
hint = "Starting value for each point. You can use this to \
'perturb' the fractal."
endparam
param p_power ; Overrides p_power from Formula
caption = "Exponent 1"
default = (2,0)
hint = "Defines the primary exponent for the fractal. The classic \
Phoenix curve uses exponent (2, 0)."
endparam
param power2
caption = "Exponent 2"
default = (0,0)
hint = "Defines the secondary exponent for the fractal.  The classic \
Phoenix curve uses exponent (0, 0)."
endparam
param induct
caption = "Distortion"
default = (0.5,0)
hint = "Sets how 'strong' the previous iteration's effect should be \
on the fractal."
endparam
param p_bailout ; Overrides p_bailout from DivergentFormula
caption = "Bailout"
default = 1.0e20
exponential = true
hint = "This parameter defines how soon an orbit bails out while \
iterating. Larger values will give smoother outlines."
endparam
}

Constructor Summary
Standard_PhoenixMandel()

Method Summary
complex Init(complex pz)
Set up for a sequence of values
complex Iterate(complex pz)
Produce the next value in the sequence

Methods inherited from class common:DivergentFormula
GetUpperBailout, IsBailedOut

Methods inherited from class common:Formula
GetLowerBailout, GetPrimaryExponent

Methods inherited from class common:Generic
GetParent

Methods inherited from class Object

Constructor Detail

Standard_PhoenixMandel

public Standard_PhoenixMandel()
Method Detail

Init

public complex Init(complex pz)
Description copied from class: DivergentFormula
Set up for a sequence of values

This function will be called at the beginning of each sequence of values (e.g. at the beginning of each fractal orbit).

Overrides:
Init in class DivergentFormula
Parameters:
pz - seed value for the sequence; for a normal fractal formula, this will be #pixel
Returns:
first value in the sequence; this corresponds to #z in a fractal formula

Iterate

public complex Iterate(complex pz)
Description copied from class: Formula
Produce the next value in the sequence

As long as the sequence has not bailed out, this function will be continually called to produce sequence values.

Overrides:
Iterate in class Formula
Parameters:
pz - previous value in the sequence; corresponds to #z in a fractal formula. Note that you should always use this value for computing the next iteration, rather than a saved value, as the calling code may modify the returned value before passing it back to the next Iterate() call.
Returns:
the next value in the sequence