|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Objectcommon:Generic
common:TrapShape
kcc5:KCC_BubblesTrap
class
The Bubbles trap.
For an example of what this trap looks like,
click here.
class KCC_BubblesTrap( common.ulb:TrapShape ) {
; The Bubbles trap.
; <p>
; For an example of what this trap looks like,
; <a href="../additional/kcc5/images/Bubbles Trap.jpg">click here</a>.
;
public:
import "common.ulb"
; constructor
func KCC_BubblesTrap( Generic pparent )
TrapShape.TrapShape( pparent )
endfunc
; call this before each sequence of values to be trapped
func Init( complex pz )
TrapShape.Init( pz )
minZ = 1.0e20
savedRange = 0
endfunc
; call this for each iteration being trapped
float func Iterate( complex pz )
TrapShape.Iterate( pz )
;****************************************************
; Save the smallest value of sqrt(|z|).
;****************************************************
temp = sqrt( |pz| )
if( temp < minZ )
minZ = temp
savedRange = m_Iterations
endif
;****************************************************
; If the orbit point exceeds the maximum value, set z to
; the index into the colormap and set the bailout flag.
;****************************************************
if( |pz| > @maxZ )
if( minZ < @bubbleSize )
m_LastChannel = savedRange
m_Texture = minZ / @bubbleSize
return minZ
endif
endif
; m_LastChannel = m_Iterations
return 1e20
endfunc
float func GetTextureValue()
return m_Texture
endfunc
protected:
float temp
float minZ
int savedRange
float m_Texture
default:
title = "Bubbles Trap"
int param v_KCC_BubblesTrap
caption = "Version (KCC_BubblesTrap)"
default = 100
hint = "This version parameter is used to detect when a change has been \
made to the formula that is incompatible with the previous version. \
When that happens, this field will reflect the old version number to \
alert you to the fact that an alternate rendering is being used."
visible = @v_KCC_BubblesTrap < 100
endparam
float param bubbleSize
caption = "Bubble Size"
default = 0.1
hint = "The size of the bubbles. Suggested range (0.1 to 0.3)."
endparam
float param maxZ
caption = "Maximum Z"
default = 4.0
hint = "The maximum size of the bubbles."
visible = false
endparam
}
| Constructor Summary | |
|---|---|
KCC_BubblesTrap()
|
|
KCC_BubblesTrap(Generic pparent)
constructor |
|
| Method Summary | |
|---|---|
float |
GetTextureValue()
Get texture value. |
void |
Init(complex pz)
call this before each sequence of values to be trapped |
float |
Iterate(complex pz)
call this for each iteration being trapped |
| Methods inherited from class common:TrapShape |
|---|
GetColorChannel, GetTransformedPoint, IterateSilent, SetThreshold |
| Methods inherited from class common:Generic |
|---|
GetParent |
| Methods inherited from class Object |
|---|
|
| Constructor Detail |
|---|
public KCC_BubblesTrap(Generic pparent)
public KCC_BubblesTrap()
| Method Detail |
|---|
public void Init(complex pz)
Init in class TrapShapepublic float Iterate(complex pz)
Iterate in class TrapShapepublic float GetTextureValue()
TrapShapeOrdinarily, a trap shape does not have a native texture (it is flat). Some formulas may pair trap shapes with trap textures, and may need more information about trap textures when trap shapes are nested via TrapShapeMerge. This function provides support for accessing texture information.
GetTextureValue in class TrapShape
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||