Object version of Basic in Standard.ucl.
Four basic and classic ways to color a fractal. Other classic
algorithms are Decomposition, Binary Decomposition, and
Distance Estimator.
class Basic(common.ulb:DirectColoring) {
;
; Object version of Basic in Standard.ucl.
;
; Four basic and classic ways to color a fractal. Other classic
; algorithms are Decomposition, Binary Decomposition, and
; Distance Estimator.
;
$define DEBUG
public:
color func Result(complex pz)
float res=0;
if @type == "Iteration"
res = (m_Iterations/#maxiter)
elseif @type == "Real"
res = (@bailout + real(pz))/@bailout*2
elseif @type == "Imaginary"
res= (@bailout + imag(pz))/ @bailout*2
else
res= (@bailout + real(pz) + imag(pz))/@bailout*2
endif
print(res)
return (@_color1*res)+rgba(0,0,0,1)
endfunc
default:
title = "Basic Direct"
helpfile = "Uf*.chm"
helptopic = "Html/coloring/standard/basic.html"
param type
caption = "Coloring Type"
enum = "Iteration" "Real" "Imaginary" "Sum"
hint = "Specifies how the fractal is colored. Most options work best \
with low bail-out values for the fractal formula, like 4. \
The Iteration option is the classic way to color fractals."
endparam
color param _color1
caption = "Color 1"
endparam
float param bailout
caption = "Bailout"
default= 4
endparam
}