|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Objectcommon:Generic
common:TrapShape
kcc5:KCC_AngleFunction1Trap
class
The Angle Function 1 trap.
For an example of what this trap looks like,
click here.
class KCC_AngleFunction1Trap( common.ulb:TrapShape ) {
; The Angle Function 1 trap.
; <p>
; For an example of what this trap looks like,
; <a href="../additional/kcc5/images/Angle Function 1 Trap.jpg">click here</a>.
;
public:
import "common.ulb"
; constructor
func KCC_AngleFunction1Trap( 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 )
angle = atan( imag( pz ) / real( pz ) )
v = @angleFunc1Multiplier * (@angleFunc1Function1( angle )^2 + \
@angleFunc1Function2( angle )^2)
distance = abs( |pz| - |v| )
if( distance < @angleFunc1Size )
m_LastChannel = m_Iterations
m_Texture = distance / @angleFunc1Size
return distance
else
return 1e20
endif
endfunc
float func GetTextureValue()
return m_Texture
endfunc
protected:
float distance
complex v
float angle
float m_Texture
default:
title = "Angle Function 1"
int param v_KCC_AngleFunction1Trap
caption = "Version (KCC_AngleFunction1Trap)"
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_AngleFunction1Trap < 100
endparam
float param angleFunc1Size
caption = "Element Size"
default = 0.1
hint = "The size of the elements. Suggested range (0.05 to 2.0)."
endparam
float param angleFunc1Multiplier
caption = "Angle Multiplier"
default = 1.0
hint = "The angle multiplier. Suggested range (0.01 to 3.14)."
endparam
func angleFunc1Function1
caption = "Function 1"
default = ident()
hint = "Modifier function 1."
endfunc
func angleFunc1Function2
caption = "Function 2"
default = ident()
hint = "Modifier function 2."
endfunc
}
| Constructor Summary | |
|---|---|
KCC_AngleFunction1Trap()
|
|
KCC_AngleFunction1Trap(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_AngleFunction1Trap(Generic pparent)
public KCC_AngleFunction1Trap()
| 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 | ||||||||