|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Objectcommon:Generic
common:Transform
common:UserTransform
mt:MT_RadialWaves
class
Mark Townsend, May 2008
class MT_RadialWaves(common.ulb:UserTransform) {
;
; Mark Townsend, May 2008
;
public:
func MT_RadialWaves(Generic pparent)
UserTransform.UserTransform(pparent)
endfunc
complex func Iterate(complex pz)
m_Iterations = m_Iterations + 1
float r = cabs(pz - @center)
float theta = atan2(pz - @center)
if theta < 0
theta = theta + 2 * #pi
endif
int iter = 0
while iter < @iterations
float or = r
r = r + @a * sin(@t * theta)
theta = theta + @a2 * cos(@t2 * or)
iter = iter + 1
endwhile
float x = r * cos(theta)
float y = r * sin(theta)
return x + flip(y) + @center
endfunc
default:
title = "Radial Waves"
param center
caption = "Center"
default = (0,0)
endparam
param iterations
caption = "Iterations"
default = 2
endparam
param t2
caption = "Theta frequency"
default = 20.0
endparam
param a2
caption = "Theta amplitude"
default = 0.1
endparam
param t
caption = "Radius frequency"
default = 20.0
endparam
param a
caption = "Radius amplitude"
default = 0.1
endparam
}
| Constructor Summary | |
|---|---|
MT_RadialWaves()
|
|
MT_RadialWaves(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_RadialWaves(Generic pparent)
public MT_RadialWaves()
| Method Detail |
|---|
public complex Iterate(complex pz)
TransformAfter 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 Transformpz - the complex value to be transformed
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||