FSK Functions

Home • Gallery • Tutorials • Download • Purchase • Site Map
 

FSK Functions Support

The FSK.OverrideValue method is used to override selected Fractal Science Kit fractal generator parameter settings. This method can only be called in the global section of Fractal Equations or Orbital Equations instructions.

Syntax:

FSK.OverrideValue(<ParameterName>, <ParameterValue>)

<ParameterName> is a quoted string that identifies the parameter to override. <ParameterValue> is the new value.

Example:

global:
 
  FSK.OverrideValue("RootDetection", True)

This example is from one of the Newton fractals. Since Newton fractals are based on Newton's method of detecting roots it almost always is best to turn on RootDetection so that the Fractal Science Kit will perform the extra processing necessary to compute which root you converge to during the fractal iteration. When RootDetection is on, the color controllers can access the sample's root index and use this in resolving the color. For this reason, we override the value of the RootDetection parameter and force it to True.

Example:

global:
 
  FSK.OverrideValue("MagnitudeValueExpression", DistanceMetric)
  FSK.OverrideValue("Bailout", Bailout)

...

properties:

  #include DistanceMetricTypes
 
  option DistanceMetric {
    type = DistanceMetricTypes
    caption = "Magnitude"
    default = DistanceMetricTypes.X2
  }
  option Bailout {
    type = Float
    caption = "Bailout"
    details = "Bailout used for divergent fractal equations"
    default = 1e16
    range = [1,]
  }

This is another typical usage pattern. In this example, we determine that this equation works best with certain parameter settings. However, if we override the current settings with the "best" settings in the global section, the user will not be able to try other values. Since we wish to allow the user to try other settings, we define several options in the properties section for these values and default these options to the "best" settings from our point of view. Then we call FSK.OverrideValue with the values of these options as shown above.

Fractal Equation Overrides

Here is the list of supported Fractal Equation overrides:

global:
 
  FSK.OverrideValue("MagnitudeValueExpression", <DistanceMetricTypes>)
  FSK.OverrideValue("MagnitudeReferencePoint", <MagnitudeReferencePoints>)
  FSK.OverrideValue("AngleReferencePoint", <AngleReferencePoints>)
  FSK.OverrideValue("Bailout", <Float>), 1 < value
  FSK.OverrideValue("Epsilon", <Float>), 0 < value < 1
  FSK.OverrideValue("MinDwell", <Integer>), 1 <= value < 32767
  FSK.OverrideValue("MaxDwell", <Integer>), 1 <= value < 32767
  FSK.OverrideValue("CycleDetection", <Boolean>)
  FSK.OverrideValue("CycleFactor", <Float>), 0 < value <= 1
  FSK.OverrideValue("CycleMax", <Integer>), 1 <= value < 32767
  FSK.OverrideValue("RootDetection", <Boolean>)
  FSK.OverrideValue("RootDetectionEpsilon", <Float>), 0 < value
  FSK.OverrideValue("RootDetectionThreshold", <Float>), 0 <= value <= 1
  FSK.OverrideValue("RootDetectionMaxRoots", <Integer>), 1 <= value < 32767
  FSK.OverrideValue("MaxPower", <Float>), 1 <= value
  FSK.OverrideValue("PowerFactor", <Float>), 0 < value

...

properties:
 
  #include DistanceMetricTypes
  #include MagnitudeReferencePoints
  #include AngleReferencePoints

DistanceMetricTypes, MagnitudeReferencePoints, and AngleReferencePoints are enums defined in the built-in macros. These can be used to override the value of the MagnitudeValueExpression, MagnitudeReferencePoint, and AngleReferencePoint values, respectively. Their definitions are included here for reference:

#define DistanceMetricTypes

enum DistanceMetricTypes {
  X2addY2,       "x^2 + y^2"
  X2,            "x^2"
  Y2,            "y^2"
  MinX2Y2,       "Min( x^2, y^2 )"
  MaxX2Y2,       "Max( x^2, y^2 )"
  MinAbsXAbsY,   "Min( |x|, |y| )"
  MaxAbsXAbsY,   "Max( |x|, |y| )"
  AbsXaddAbsY2,  "( |x| + |y| )^2"
  AbsXsubAbsY2,  "( |x| - |y| )^2"
  AbsXaddAbsY,   "| |x| + |y| |"
  AbsXsubAbsY,   "| |x| - |y| |"
  AbsX3addAbsY3, "| |x^3| + |y^3| |"
  AbsX3subAbsY3, "| |x^3| - |y^3| |"
  X2subY2,       "| x^2 - y^2 |"
  XmulY,         "| x * y |"
}
#end

#define MagnitudeReferencePoints

enum MagnitudeReferencePoints {
  Origin,                        "Origin"
  PreviousOrbitPoint,            "Previous Orbit Point"
  PreviousMagnitudeCurrentAngle, "Previous Magnitude, Current Angle"
  PreviousAngleCurrentMagnitude, "Previous Angle, Current Magnitude"
}
#end

#define AngleReferencePoints

enum AngleReferencePoints {
  Origin,                   "Origin"
  PreviousOrbitPoint,       "Previous Orbit Point"
  SecondPreviousOrbitPoint, "Second Previous Orbit Point"
}
#end

Orbital Equation Overrides

Here is the list of supported Orbital Equations overrides:

global:
 
  FSK.OverrideValue("MinCount", <Integer>), 0 <= value < 32767
  FSK.OverrideValue("MaxCount", <Integer>), 1 <= value < 32767

 

Copyright © 2004-2019 Ross Hilbert
All rights reserved