rkb
Class RKB_TrapShapeDeformShape
Object
common:Generic
common:TrapShape
rkb:RKB_TrapShapeDeformShape
class
- TrapShape:RKB_TrapShapeDeformShape
A shape plug-in which transforms other shapes including twists, ridges,
and waves
Ultra Fractal Source
Toggle UF Source Code Display
class RKB_TrapShapeDeformShape(common.ulb:TrapShape) {
; A shape plug-in which transforms other shapes including twists, ridges,
; and waves
public:
import "dmj5.ulb"
func RKB_TrapShapeDeformShape(Generic pparent)
TrapShape(pparent)
; True if function list is set to 'ident'
Shape = new @shape(this)
endfunc
float func Iterate(complex pz)
fTheta = atan2(pz)
fR = cabs(pz)
; Twist
fTheta = fTheta + real(@funcTwist(fR)) * @fTwist
;Bulge
fR = fR^@fBulge
;Waves
fTheta = fTheta + @fWaveAmp/100*fR^@fWaveSkew*sin(fR*@fWaveFreq*2*#pi)
;Oscillator
if (sin(fTheta*@fOscFreq) > 0)
fTheta = fTheta + @fOscPhase/180*#pi
endif
fX = fR*cos(fTheta)
fY = fR*sin(fTheta)
tz = fX + flip(fY)
fIndex = Shape.Iterate(tz)
; Scale/Bloom the shape
fIndex = fIndex / @fBloom
; Ridges
fIndex = fIndex - (@fRidgesAmp)/100*real(sin(fTheta*(@fRidgesFreq)*2*#pi))
return fIndex
endfunc
private:
TrapShape Shape
complex tz
float fX
float fY
float fR
float fTheta
float fIndex
default:
title = "Deform Shape"
int param iVersion
default = 1
visible = false
endparam
TrapShape param shape
caption = "Trap Shape"
; default = RKB_TrapShapeFlower
default = DMJ_TrapShapeAstroid
hint = "Selects a shape to be used for the deformations."
endparam
float param fBloom
Caption = "Bloom"
default = 1.0
hint = "Scales the shape often revealing more detail."
endparam
float param fBulge
Caption = "Bulge"
default = 1.0
hint = "Buldge out the shape. Negative values tend to invert the shape."
endparam
float param fTwist
caption = "Twist"
default = 0
hint = "Positive values twist clockwise, negative values counter clockwise."
endparam
func funcTwist
caption = "Twist function override"
default = ident()
hint="Varies the amount of twist by the function applied to the distance."
endfunc
float param fRidgesFreq
Caption = "Ridges Frequency"
default = 0.0
hint = "Adds ridges/lines to the shape."
endparam
float param fRidgesAmp
Caption = "Ridges Power"
default = 0.0
endparam
float param fWaveFreq
Caption = "Waves Frequency"
default = 0.0
hint = "Adds waves to the shape."
endparam
float param fWaveAmp
Caption = "Waves Power"
default = 0.0
endparam
float param fWaveSkew
Caption = "Wave Skew"
default = 0.0
hint="Skews waviness. Positive numbers push the waviness to the outside \
of the shape. Negative numbers push the waviness to the inside."
endparam
float param fOscFreq
Caption = "Oscillator Frequency"
default = 0.0
hint="Combines two out-of-phase versions of the shape."
endparam
float param fOscPhase
Caption = "Oscillator Phase"
default = 45.0
endparam
}
Method Summary |
float |
Iterate(complex pz)
call this for each iteration being trapped |
Methods inherited from class Object |
|
RKB_TrapShapeDeformShape
public RKB_TrapShapeDeformShape(Generic pparent)
RKB_TrapShapeDeformShape
public RKB_TrapShapeDeformShape()
Iterate
public float Iterate(complex pz)
- Description copied from class:
TrapShape
- call this for each iteration being trapped
- Overrides:
Iterate
in class TrapShape