﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<Fractal Type="Orbital" OverSampling="Sample3x3" PixelSize="0.00333333333333333" Pixels.X="800" Pixels.Y="600" MaxCount="20">
  <FractalNotes><![CDATA[]]></FractalNotes>
  <OrbitalEquation Id="b3a04154-5da7-4bdc-b7e6-d818c50a717a" Title="Symmetric Icon - Standard Formula" ZInitMin="0.1+0.1i" SingleAttractor="True">
    <Instructions><![CDATA[
comment:
  
  This program is based on information 
  found in the book "Symmetry in Chaos" 
  by Michael Field and Martin Golumitsky.
  http://math.uh.edu/~chaos/symmetry_in_chaos.html
  
  See the discussion of Symmetric Icons in the book
  for a very thorough treatment on the derivation 
  of this equation along with many high quality
  illustrations and technical details.
  
  In addition to symmetric icons, the book covers
  planar symmetries, tilings and wallpaper patterns,
  square quilts (repeating patterns), hexagonal quilts,
  and symmetric fractals.
  
  For many interesting variations, set 'Point to Track'
  to 'Triangle Metric Point' and experiment with different
  triangle metrics.
  
iterate:
  
  attractorIndex = Abs(Orbit.Point(-ColorOffset))
  
  r = AbsSqr(z)
  s = z^(Symmetry-1)
  t = Re(z*s)
  u = Conj(s)
  z = (Lambda + Alpha*r + Beta*t + 1i*Omega)*z + Gamma*u
  
properties:
  
  optionMap Examples(Lambda, Alpha, Beta, Gamma, Omega, Symmetry) {
    Custom, "<Custom>", 0, 0, 0, 0, 0, 3
    '
    ' The following were found using: Symmetric Icon - Standard Formula (Search)
    '
    Ex01, "Example 01",  2.667936, -3.306679, -1.979169,  0.779975,  0.175012, 6
    Ex02, "Example 02", -2.698298,  9.050139, -5.461418, -0.708514,  0.139962, 7
    Ex03, "Example 03", -2.5,       2.653511,  0.204628, -0.704298,  0.130602, 4
    Ex04, "Example 04", -2.5,       2.388883, -0.252899,  0.045032,  0.357824, 8
    Ex05, "Example 05", -2.671085,  3.147334, -0.828511,  0.291649, -0.255845, 6
    Ex06, "Example 06",  2.810175, -6.426155,  2.932291,  0.562912,  0.022757, 3
    Ex07, "Example 07",  2.609205, -2.441726,  0.728151, -0.450271,  0.249900, 6
    Ex08, "Example 08",  2.583628, -4.167053,  2.321106, -0.446589,  0.243974, 6
    Ex09, "Example 09",  2.463124, -6.797370,  4.033378, -0.054408,  0.038937, 3
    Ex10, "Example 10",  2.473001, -3.052126,  0.948240,  0.019809, -0.595105, 4
    Ex11, "Example 11",  2.245898, -1.709352,  0.562157, -0.667793, -0.505381, 4
    Ex12, "Example 12", -2.495718,  4.186402,  0.027414, -0.219521,  0.115629, 4
    Ex13, "Example 13", -2.8,       5,        -1.388518, -0.494587, -0.424546, 8
    Ex14, "Example 14", -2.8,       5,        -1.598899, -0.168613, -0.182864, 6
    Ex15, "Example 15",  2.642730, -4.164956,  1.927603, -0.307753, -0.273918, 7
    Ex16, "Example 16", -1.714040,  1.831585, -0.784826,  0.592229,  0.799145, 5
    Ex17, "Example 17",  2.657586, -2.611844, -0.366655,  0.351520,  0.110786, 3
    Ex18, "Example 18",  2.407251, -1.834415,  0.087943, -0.275421, -0.685389, 5
    Ex19, "Example 19", -2.476626,  3.918835, -3.440992,  0.770200,  0.449949, 7
    Ex20, "Example 20",  2.378747, -3.679915,  1.083388, -0.010928,  0.009599, 4
    Ex21, "Example 21", -1.364327,  0.306173,  1.014955,  0.745226,  0.008172, 5
    Ex22, "Example 22",  1.856497, -2.654289,  4.451671,  0.570039, -0.499022, 7
    Ex23, "Example 23",  2.302005, -4.296610,  2.304882, -0.865191, -0.191037, 6
    Ex24, "Example 24", -2.691883,  4.509101, -1.793248,  0.651565,  0.034964, 6
    Ex25, "Example 25",  2.322951, -2.132878, -0.015660,  0.569576, -0.339110, 5
    Ex26, "Example 26", -2.697982,  4.536456, -2.214199,  0.594120, -0.308312, 5
    Ex27, "Example 27",  2.597716, -8.042603,  5.983799, -0.234028,  0.321958, 5
    Ex28, "Example 28", -2.480921,  3.599523,  3.049870, -0.849599, -0.231650, 7
    Ex29, "Example 29",  2.763653, -4.736137, -1.031779, -0.211560, -0.323401, 7
    Ex30, "Example 30",  2.726101, -4.918009,  2.253942, -0.373500,  0.362453, 5
    Ex31, "Example 31", -2.695979,  8.450377, -5.574479, -0.364786,  0.334946, 4
    Ex32, "Example 32", -2.552284,  4.235432, -2.705874,  0.761512, -0.229341, 3
    Ex33, "Example 33", -2.571275,  4.368657,  1.460625,  0.059430,  0.266276, 5
    Ex34, "Example 34",  2.433684, -2.963451, -0.389841,  0.818551,  0.024725, 6
    Ex35, "Example 35",  2.646093, -4.547851,  2.510110, -0.058426, -0.370161, 6
    Ex36, "Example 36",  2.321897, -2.706064,  1.587950, -0.604826, -0.429452, 6
    Ex37, "Example 37", -2.266250,  2.497139,  1.020685, -0.921194,  0.053498, 7
    Ex38, "Example 38", -2.523626,  3.783657, -1.075982,  0.111387,  0.609569, 6
  }
  option Icon {
    type = Examples
    caption = "Icon"
    default = Examples.Ex01
  }
  option Lambda {
    type = Float
    caption = "Lambda"
    default = 1
    range = [-3,3]
  }
  option Alpha {
    type = Float
    caption = "Alpha"
    default = -1
    range = (,)
  }
  option Beta {
    type = Float
    caption = "Beta"
    default = 0
    range = (,)
  }
  option Gamma {
    type = Float
    caption = "Gamma"
    default = 0
    range = [-1,1]
  }
  option Omega {
    type = Float
    caption = "Omega"
    default = 0
    range = [-1,1]
  }
  option Symmetry {
    type = Integer
    caption = "Symmetry"
    default = 3
    range = [3,)
  }
  divider {
    caption = "Color Adjustment"
  }
  option ColorOffset {
    type = IntegerEnum(0,7)
    caption = "Color Offset"
    details = "Use to adjust color assignment"
    default = 0
  }
]]></Instructions>
    <PropertyValueOverrides />
  </OrbitalEquation>
  <Orbital SourcePoint="TriangleMetricPoint">
    <TransformationArray>
      <Transformation Id="7fc4bc2c-b961-4431-b074-277d7b29842b" Title="Identity">
        <Instructions><![CDATA[]]></Instructions>
        <PropertyValueOverrides />
      </Transformation>
    </TransformationArray>
    <OrbitalOrbitTransform />
    <SymmetryTransformation Id="8301dc6c-2273-4fb9-ada8-2ded2833031f" Title="Identity">
      <Instructions><![CDATA[]]></Instructions>
      <PropertyValueOverrides />
    </SymmetryTransformation>
    <TransformationArray>
      <Transformation Id="33fc12b2-4054-493c-8d1c-24bd45446caf" Title="Composite Function">
        <Instructions><![CDATA[
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
  }
]]></Instructions>
        <PropertyValueOverrides>
          <Option Name="F" Type="FunctionProxyOption" Value="Ident" />
        </PropertyValueOverrides>
      </Transformation>
    </TransformationArray>
    <TransformationArray>
      <Transformation Id="7fc4bc2c-b961-4431-b074-277d7b29842b" Title="Identity">
        <Instructions><![CDATA[]]></Instructions>
        <PropertyValueOverrides />
      </Transformation>
    </TransformationArray>
    <OrbitalSampleNormalizer>
      <NormalizerDescriptor />
    </OrbitalSampleNormalizer>
    <OrbitalSampleNormalizer>
      <NormalizerDescriptor />
    </OrbitalSampleNormalizer>
    <OrbitalSampleNormalizer>
      <NormalizerDescriptor />
    </OrbitalSampleNormalizer>
    <OrbitalSampleNormalizer>
      <NormalizerDescriptor />
    </OrbitalSampleNormalizer>
    <OrbitalSampleNormalizer>
      <NormalizerDescriptor />
    </OrbitalSampleNormalizer>
    <AdaptiveSmoothing Active="True" />
    <OrbitalMasterController Id="f6e61dc5-ab48-45cd-a404-3686f5acbf1f" Title="Pass Thru">
      <Instructions><![CDATA[
comment:
  
  Return color computed by 1st controller.
  
color:
  
  color = Controller.Color(0)
]]></Instructions>
      <PropertyValueOverrides />
    </OrbitalMasterController>
    <OrbitalControllerArray>
      <OrbitalController Id="9e4fece2-4f73-44be-a012-b65e2f6ddd83" Title="Direct Color Map - RGB Blend" SaturationAdjustment="-50">
        <GradientArray />
        <TextureArray />
        <Instructions><![CDATA[
comment:
  
color:
  
  color = Color.Blend( \
    ColorBlendType, \
    Color( \
      Bounce(OffsetR0 + FactorR0*R0^PowerR0), \
      Bounce(OffsetG0 + FactorG0*G0^PowerG0), \
      Bounce(OffsetB0 + FactorB0*B0^PowerB0), \
      1 \
    ), \
    Color( \
      Bounce(OffsetR1 + FactorR1*R1^PowerR1), \
      Bounce(OffsetG1 + FactorG1*G1^PowerG1), \
      Bounce(OffsetB1 + FactorB1*B1^PowerB1), \
      1 \
    ), \
    ColorBlendPower \
  )
  
properties:
  
  #include ColorBlendTypes
  
  divider {
    caption = "Color Blend Options"
  }
  option ColorBlendType {
    type = ColorBlendTypes
    caption = "Blend Type"
    details = "Type of blend"
    default = ColorBlendTypes.Average
  }
  option ColorBlendPower {
    type = Float
    caption = "Blend Power"
    details = "Power applied to blend (0-1)"
    default = 1
    range = [0,1]
  }
  #define ColorComponent(Title, Name, DefValue, DefPower, DefFactor, DefOffset)
  
  divider {
    caption = "#Title#"
  }
  option #Name# {
    type = SamplePointValue
    caption = "Value"
    default = #DefValue#
  }
  option Power#Name# {
    type = Float
    caption = "Power"
    details = "Set value = value ^ Power (0.125 to 8)"
    default = #DefPower#
    range = [0.125,8]
  }
  option Factor#Name# {
    type = Float
    caption = "Factor"
    details = "Set value = value * Factor (-8 to 8)"
    default = #DefFactor#
    range = [-8,8]
  }
  option Offset#Name# {
    type = Float
    caption = "Offset"
    details = "Set value = value + Offset (-1 to 1)"
    default = #DefOffset#
    range = [-1,1]
  }
  #end
  
  #include ColorComponent("Base Color Red Mapping", "R0", "Sample.AttractorIndex", "1", "1", "0")
  #include ColorComponent("Base Color Green Mapping", "G0", "Sample.Speed", "1", "1", "0")
  #include ColorComponent("Base Color Blue Mapping", "B0", "Sample.Acceleration", "1", "1", "0")
  #include ColorComponent("Blend Color Red Mapping", "R1", "Sample.Speed", "1", "1", "1")
  #include ColorComponent("Blend Color Green Mapping", "G1", "Sample.Acceleration", "1", "1", "1")
  #include ColorComponent("Blend Color Blue Mapping", "B1", "Sample.AttractorIndex", "1", "1", "1")
]]></Instructions>
        <PropertyValueOverrides>
          <Option Name="ColorBlendType" Type="EnumOption" Value="ColorBlendTypes.Multiply" />
        </PropertyValueOverrides>
      </OrbitalController>
    </OrbitalControllerArray>
  </Orbital>
  <TransformationArray>
    <Transformation Id="7fc4bc2c-b961-4431-b074-277d7b29842b" Title="Identity">
      <Instructions><![CDATA[]]></Instructions>
      <PropertyValueOverrides />
    </Transformation>
  </TransformationArray>
  <TriangleMetricSet>
    <Instructions><![CDATA[metric = p1]]></Instructions>
    <TriangleMetric />
    <TriangleMetric />
    <TriangleMetric />
  </TriangleMetricSet>
</Fractal>