mt
Class MT_TrapShapeTransform
Object
common:Generic
common:Transform
common:UserTransform
mt:MT_TrapShapeTransform
class
- UserTransform:MT_TrapShapeTransform
Mark Townsend, June 2008
Ultra Fractal Source
Toggle UF Source Code Display
class MT_TrapShapeTransform(common.ulb:UserTransform) {
;
; Mark Townsend, June 2008
;
public:
func MT_TrapShapeTransform(Generic pparent)
UserTransform.UserTransform(pparent)
fTrapShape = new @p_trapshape(this)
endfunc
func Init(complex pz)
UserTransform.Init(pz)
fTrapShape.Init(pz)
endfunc
complex func Iterate(complex pz)
if @mode == "Return Value"
float a = fTrapShape.Iterate(pz)
return pz + exp(flip(2 * #pi * sqrt(2) * a)) * @strength
else
fTrapShape.Iterate(pz)
return fTrapShape.GetTransformedPoint()
endif
endfunc
private:
TrapShape fTrapShape
default:
title = "Trap Shape"
param mode
caption = "Value to use"
enum = "Return Value" "Transformed Point"
endparam
float param strength
caption = "Strength"
default = 0.25
min = 1E-20
visible = @mode == "Return Value"
endparam
TrapShape param p_trapshape
caption = "Trap Shape"
default = MT_PerlinNoiseTexture
endparam
}
Methods inherited from class Object |
|
MT_TrapShapeTransform
public MT_TrapShapeTransform(Generic pparent)
MT_TrapShapeTransform
public MT_TrapShapeTransform()
Init
public void Init(complex pz)
- Description copied from class:
Transform
- Set up for a sequence of values
This function will be called at the beginning of each
sequence of values (e.g. at the beginning of each fractal
orbit). It will be called even if only one value is being
transformed (e.g. a normal transformation formula). Use
this to perform any setup that is exactly the same for
each value in the sequence being transformed.
- Overrides:
Init
in class Transform
- Parameters:
pz
- the value representing the sequence; for a normal transformation formula use, this will be #pixel. In some cases this may differ from the first value passed to Iterate() if the calling code applies some other transformations.
Iterate
public complex Iterate(complex pz)
- Description copied from class:
Transform
- Transform a single point within a sequence
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.
- Overrides:
Iterate
in class Transform
- Parameters:
pz
- the complex value to be transformed
- Returns:
- the transformed value