|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object common:Generic common:TrapShape kcc5:KCC_ConesTrap
class
The Cones trap.
When using this with Orbit Traps Direct (UF5), the Trap Threshold parameter needs to be set high. Also, the Trap Merge Order needs to be bottom-up rather than top-down.
For an example of what this trap looks like,
click here.
class KCC_ConesTrap( common.ulb:TrapShape ) { ; The Cones trap. ; <p> ; When using this with Orbit Traps Direct (UF5), the Trap Threshold ; parameter needs to be set high. Also, the Trap Merge Order needs ; to be bottom-up rather than top-down. ; <p> ; For an example of what this trap looks like, ; <a href="../additional/kcc5/images/Cones Trap.jpg">click here</a>. ; public: import "common.ulb" ; constructor func KCC_ConesTrap( Generic pparent ) TrapShape.TrapShape( pparent ) endfunc ; call this before each sequence of values to be trapped func Init( complex pz ) TrapShape.Init( pz ) prev_z = pz endfunc ; call this for each iteration being trapped float func Iterate( complex pz ) TrapShape.Iterate( pz ) ; Color is not set until Maximum Iterations reached. m_LastChannel = m_Iterations + 1 angle = abs( atan( ( imag( pz ) - imag( prev_z ) ) / ( real( pz ) - real( prev_z ) ) ) ) if( ( real( pz ) - real( prev_z ) ) < 0.0 ) angle = #pi - angle endif m_Texture = angle / #pi prev_z = pz return angle endfunc float func GetTextureValue() return m_Texture endfunc protected: complex prev_z complex initialZ float angle float m_Texture default: title = "Cones Trap" heading caption = "Information" text = "When this trap is used with the Orbit Traps Direct (UF5) \ coloring in dmj5.ucl, the Trap Threshold parameter needs to \ be set high. Also, the Trap Merge Order needs to be bottom-up \ rather than top-down." endheading int param v_KCC_ConesTrap caption = "Version (KCC_ConesTrap)" 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_ConesTrap < 100 endparam }
Constructor Summary | |
---|---|
KCC_ConesTrap()
|
|
KCC_ConesTrap(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_ConesTrap(Generic pparent)
public KCC_ConesTrap()
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 |