好象是要经过一个变换才能得到那个图形:comment:
Implements a transformation based on the composite function:
z = G(F(z))
Both F abd G are applied relative to a conjugating map
defined as a Mobius transformation. For example, we define
the conjugation of F with respect to the conjugating map
MapF as:
z = Mobius.TransformPoint(MapF, F(Mobius.InverseTransformPoint(MapF, z)))
a similar conjugation is defined for G. Finally, the
composite function is applied Power times to z.
global:
'
' Initialize conjugating maps MapF and MapG.
'
const Mobius MapF = Mobius.Identity()
const Mobius MapG = Mobius.Identity()
const Complex ApplyMapF = ShiftF <> 0 || AngleF <> 0 || ScaleF <> 1 || InvertF
const Complex ApplyMapG = ShiftG <> 0 || AngleG <> 0 || ScaleG <> 1 || InvertG
if (ApplyMapF) {
Mobius.Translate(MapF, ShiftF)
Mobius.Rotate(MapF, DegreeToRadian(AngleF))
Mobius.Scale(MapF, ScaleF)
if (InvertF) {
Mobius.ApplyInversion(MapF)
}
}
if (ApplyMapG) {
Mobius.Translate(MapG, ShiftG)
Mobius.Rotate(MapG, DegreeToRadian(AngleG))
Mobius.Scale(MapG, ScaleG)
if (InvertG) {
Mobius.ApplyInversion(MapG)
}
}
transform:
if (ApplyMapF) {
z = Mobius.TransformPoint(MapF, F(Mobius.InverseTransformPoint(MapF, z)))
} else {
z = F(z)
}
if (ApplyMapG) {
z = Mobius.TransformPoint(MapG, G(Mobius.InverseTransformPoint(MapG, z)))
} else {
z = G(z)
}
z *= Scale
properties:
#include ComplexFunctions
divider {
caption = "General"
}
option Scale {
type = Float
caption = "Scale"
details = "Scale factor applied to composite value"
default = 1
}
divider {
caption = "F(z)"
}
option F {
type = ComplexFunctions
caption = "F(z)"
default = Pow2
}
divider {
caption = "Conjugating map applied to F(z)"
}
option ShiftF {
type = Complex
caption = "Shift"
details = "Translation component"
default = 0
}
option ScaleF {
type = Float
caption = "Scale"
details = "Scale factor"
default = 1
}
option AngleF {
type = Float
caption = "Angle"
details = "Angle of rotation"
default = 0
range = [-360,360]
}
option InvertF {
type = Boolean
caption = "Invert"
details = "Apply complex inversion"
default = False
}
divider {
caption = "G(z)"
}
option G {
type = ComplexFunctions
caption = "G(z)"
default = Ident
}
divider {
caption = "Conjugating map applied to G(z)"
}
option ShiftG {
type = Complex
caption = "Shift"
details = "Translation component"
default = 0
}
option ScaleG {
type = Float
caption = "Scale"
details = "Scale factor"
default = 1
}
option AngleG {
type = Float
caption = "Angle"
details = "Angle of rotation"
default = 0
range = [-360,360]
}
option InvertG {
type = Boolean
caption = "Invert"
details = "Apply complex inversion"
default = False
} |