|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object common:Generic common:TrapShape kcc5:KCC_StalksTrap
class
The Stalks trap.
For an example of what this trap looks like,
click here.
class KCC_StalksTrap( common.ulb:TrapShape ) { ; The Stalks trap. ; <p> ; For an example of what this trap looks like, ; <a href="../additional/kcc5/images/Stalks Trap.jpg">click here</a>. ; public: import "common.ulb" ; constructor func KCC_StalksTrap( Generic pparent ) TrapShape.TrapShape( pparent ) endfunc ; call this before each sequence of values to be trapped func Init( complex pz ) TrapShape.Init( pz ) endfunc ; call this for each iteration being trapped float func Iterate( complex pz ) TrapShape.Iterate( pz ) if( abs( real( pz ) ) <= abs( imag( pz ) ) ) minDist = abs( real( pz ) ) else minDist = abs( imag( pz ) ) endif if( (minDist < @stalkWidth) && (|pz| < @stalkLength) ) m_LastChannel = m_Iterations m_Texture = minDist / @stalkWidth return minDist else return 1e20 endif endfunc float func GetTextureValue() return m_Texture endfunc protected: float minDist float m_Texture default: title = "Stalks Trap" int param v_KCC_StalksTrap caption = "Version (KCC_StalksTrap)" 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_StalksTrap < 100 endparam float param stalkWidth caption = "Stalk Width" default = 0.1 hint = "Width of the stalk. Suggested range (0.01 to 0.5)." endparam float param stalkLength caption = "Stalk Length" default = 0.1 hint = "Length of the stalk. Suggested range (0.01 to 10000.0)." endparam }
Constructor Summary | |
---|---|
KCC_StalksTrap()
|
|
KCC_StalksTrap(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_StalksTrap(Generic pparent)
public KCC_StalksTrap()
Method Detail |
---|
public void Init(complex pz)
Init
in class TrapShape
public float Iterate(complex pz)
Iterate
in class TrapShape
public float GetTextureValue()
TrapShape
Ordinarily, 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 |