Standard
Class Standard_Decomposition
Object
common:Generic
common:Coloring
common:GradientColoring
Standard:Standard_Decomposition
class
- GradientColoring:Standard_Decomposition
Object version of Decomposition in Standard.ucl.
Decomposes the angle of the Z variable after iteration and distributes it
over the gradient. See also the Binary Decomposition coloring algorithm.
Originally written by Damien M. Jones
Ultra Fractal Source
Toggle UF Source Code Display
class Standard_Decomposition(common.ulb:GradientColoring) {
;
; Object version of Decomposition in Standard.ucl.
;
; Decomposes the angle of the Z variable after iteration and distributes it
; over the gradient. See also the Binary Decomposition coloring algorithm.
;
; Originally written by Damien M. Jones
;
public:
float func ResultIndex(complex pz)
float d = atan2(pz) ; get angle of z
IF (d < 0) ; it's negative
d = d + #pi * 2 ; make it positive
ENDIF
return d / (#pi * 2)
endfunc
default:
title = "Decomposition"
helpfile = "Uf*.chm"
helptopic = "Html/coloring/standard/decomposition.html"
}
Method Summary |
float |
ResultIndex(complex pz)
Produce a resulting color index after a sequence is finished |
Methods inherited from class Object |
|
Standard_Decomposition
public Standard_Decomposition()
ResultIndex
public float ResultIndex(complex pz)
- Description copied from class:
GradientColoring
- Produce a resulting color index after a sequence is finished
This corresponds to the final: section in a coloring formula.
Once it is called, no further calls to Iterate() should be
made without calling Init() first.
- Overrides:
ResultIndex
in class GradientColoring
- Returns:
- the gradient index (corresponding to #index in a coloring formula)