Standard
Class Standard_Mirror
Object
common:Generic
common:Transform
common:UserTransform
Standard:Standard_Mirror
class
- UserTransform:Standard_Mirror
Object version of Mirror in Standard.uxf.
Mirrors a layer around any arbitrary axis. With the default
settings, it is reflected horizontally, so pixels originally
on the left end up on the right.
Originally written by Damien M. Jones.
Ultra Fractal Source
Toggle UF Source Code Display
class Standard_Mirror(common.ulb:UserTransform) {
;
; Object version of Mirror in Standard.uxf.
;
; Mirrors a layer around any arbitrary axis. With the default
; settings, it is reflected horizontally, so pixels originally
; on the left end up on the right.
;
; Originally written by Damien M. Jones.
;
public:
complex func Iterate(complex pz)
float a = @angle
if @axis == "horizontal"
a = 90
elseif @axis == "vertical"
a = 0
endif
complex center2 = @refcenter
IF (@centermove)
center2 = #center
ENDIF
complex r = (0,1) ^ (a / 90.0)
pz = (pz-center2) * r
pz = conj(pz)
return pz * conj(r) + center2
endfunc
default:
title = "Mirror"
helpfile = "Uf*.chm"
helptopic = "Html/transformations/standard/mirror.html"
param axis
caption = "Reflection Axis"
default = 0
enum = "horizontal" "vertical" "arbitrary"
hint = "Gives the axis of reflection."
endparam
param angle
caption = "Reflection Angle"
default = 0.0
hint = "This is the angle for the axis of reflection."
visible = @axis == "arbitrary"
endparam
complex param refcenter
caption = "Center"
default = #center
enabled = !@centermove
hint = "Sets the center of reflection. Use the eyedropper \
to pick it."
endparam
param centermove
caption = "Use Screen Center"
default = false
hint = "If set, reflection is assumed to be at the center of \
the window, regardless of the Reflection Center setting."
endparam
}
Methods inherited from class Object |
|
Standard_Mirror
public Standard_Mirror()
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