|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object common:Generic common:Transform common:UserTransform mt:MT_CrazySpiral
class
Mark Townsend, May 2008
class MT_CrazySpiral(common.ulb:UserTransform) { ; ; Mark Townsend, May 2008 ; public: func MT_CrazySpiral(Generic pparent) UserTransform.UserTransform(pparent) endfunc complex func Iterate(complex pz) m_Iterations = m_Iterations + 1 w = pz - @center float r = cabs(w) float theta = atan2(w) if theta < 0 theta = theta + 2 * #pi endif theta = @a * real(@fn1(r)) + theta + @amp * sin(@b * theta) float x = r * cos(theta) float y = r * sin(theta) return x + flip(y) + @center endfunc default: title = "Crazy Spiral" param center caption = "Center" default = (0,0) endparam param a caption = "Tightness" default = 3.0 endparam param b caption = "Wave frequency" default = 20.0 endparam param amp caption = "Wave amplitude" default = 1.0 endparam func fn1 caption = "Function" default = ident() endfunc }
Constructor Summary | |
---|---|
MT_CrazySpiral()
|
|
MT_CrazySpiral(Generic pparent)
|
Method Summary | |
---|---|
complex |
Iterate(complex pz)
Transform a single point within a sequence |
Methods inherited from class common:Transform |
---|
Init, IsSolid, IterateSilent |
Methods inherited from class common:Generic |
---|
GetParent |
Methods inherited from class Object |
---|
|
Constructor Detail |
---|
public MT_CrazySpiral(Generic pparent)
public MT_CrazySpiral()
Method Detail |
---|
public complex Iterate(complex pz)
Transform
After a sequence has been set up with Init(), this function will be called once for each value in the sequence. Note that all values in the sequence must be processed in order (they cannot be processed out of order). If the sequence contains only one value, Init() will still be called and then Iterate() will be called just once.
Iterate
in class Transform
pz
- the complex value to be transformed
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |