public abstract class AConvergentFractalIterator extends AFractalIterator
AConvergentFractalIterator
class provides a base class for convergent fractals (e.g., Newton-Raphson).
Note that this is an abstract class.
AFractalIterator.EFractalType
Modifier and Type | Field and Description |
---|---|
protected org.sm.smtools.math.complex.ComplexNumber |
fPower
The power of the fractal iterator.
|
static org.sm.smtools.math.complex.ComplexNumber |
kMaxAlpha
The maximum value for alpha.
|
static org.sm.smtools.math.complex.ComplexNumber |
kMinAlpha
The minimum value for alpha.
|
fBifurcationAxisZ1, fBifurcationAxisZ2, fBifurcationOutlierPercentileOffset, fBifurcationPoints, fCalculateAdvancedColoring, fComplexHeight, fComplexWidth, fDualParameter, fEscapeRadius, fEscapeRadiusSqr, fExteriorGaussianIntegersTrapFactor, fExteriorOrbitTrapCrossStalksCentre, fExteriorOrbitTrapDiskCentre, fExteriorOrbitTrapDiskRadius, fExteriorOrbitTrapSineAdditiveFactor, fExteriorOrbitTrapSineMultiplicativeFactor, fExteriorOrbitTrapTangensAdditiveFactor, fExteriorOrbitTrapTangensMultiplicativeFactor, fExteriorStripingDensity, fFractalType, fInteriorGaussianIntegersTrapFactor, fInteriorOrbitTrapCrossStalksCentre, fInteriorOrbitTrapDiskCentre, fInteriorOrbitTrapDiskRadius, fInteriorOrbitTrapSineAdditiveFactor, fInteriorOrbitTrapSineMultiplicativeFactor, fInteriorOrbitTrapTangensAdditiveFactor, fInteriorOrbitTrapTangensMultiplicativeFactor, fInteriorStripingDensity, fInvertYAxis, fMaxBifurcationValue, fMaxNrOfIterations, fMinBifurcationValue, fNrOfBifurcationPoints, fNrOfBifurcationPointsPerOrbit, fNrOfBifurcationPointsToDiscard, fP1, fP1X, fP1Y, fP2, fP2X, fP2Y, fScreenBounds, fScreenHeight, fScreenWidth, fUseFixedNrOfIterations, fZ0, kInitialScreenBounds
Constructor and Description |
---|
AConvergentFractalIterator()
Constructs an
AConvergentFractalIterator object. |
Modifier and Type | Method and Description |
---|---|
protected org.sm.smtools.math.complex.ComplexNumber |
evaluateOrbit(org.sm.smtools.math.complex.ComplexNumber z,
org.sm.smtools.math.complex.ComplexNumber c)
Evaluates the orbit of the specified complex variable z.
|
org.sm.smtools.math.complex.ComplexNumber |
getAlpha()
Returns the alpha used for the relaxed Newton/Raphson root finding process.
|
boolean |
getAutomaticRootDetectionEnabled()
Returns whether or not automatic root detection is enabled.
|
java.lang.String |
getCustomFilenamePart()
Returns the power in the custom filename part.
|
org.sm.smtools.math.complex.ComplexNumber |
getDefaultDualParameter()
Returns the default dual parameter in the complex plane.
|
double |
getDefaultEscapeRadius()
Returns the default escape radius of 100.0.
|
org.sm.smtools.math.complex.ComplexNumber |
getDefaultP1()
Returns the default upper-left corner in the complex plane.
|
org.sm.smtools.math.complex.ComplexNumber |
getDefaultP2()
Returns the default lower-right corner in the complex plane.
|
protected org.sm.smtools.math.complex.ComplexNumber |
getDefaultPower()
Returns the default power.
|
double |
getDerivativeDelta()
Returns the delta used for calculating the derivative.
|
double |
getMaxObservedExponentialIterationCount()
Returns the maximum observed exponential iteration count.
|
org.sm.smtools.math.complex.ComplexNumber |
getPower()
Returns the power for this fractal.
|
double |
getRootTolerance()
Returns the tolerance used for finding roots.
|
protected org.sm.smtools.math.complex.ComplexNumber |
initialiseIterations(org.sm.smtools.math.complex.ComplexNumber z,
org.sm.smtools.math.complex.ComplexNumber c)
Initialises the first iteration.
|
protected IterationResult |
iterate(org.sm.smtools.math.complex.ComplexNumber z,
org.sm.smtools.math.complex.ComplexNumber c,
boolean saveOrbit)
Helper method for a general iteration with the Newton-Raphson root finding algorithm.
|
protected void |
plainTextLoadCustomParameters(org.sm.smtools.util.TextFileParser tfp)
Loads custom fractal parameters from a plain-text file.
|
protected void |
plainTextSaveCustomParameters(org.sm.smtools.util.TextFileWriter tfw)
Saves custom fractal parameters to a plain-text file.
|
void |
setAlpha(org.sm.smtools.math.complex.ComplexNumber alpha)
Sets the alpha used for the relaxed Newton/Raphson root finding process.
|
void |
setAutomaticRootDetectionEnabled(boolean automaticRootDetectionEnabled)
Sets whether or not automatic root detection should be enabled.
|
void |
setDerivativeDelta(double derivativeDelta)
Sets the delta used for calculating the derivative.
|
void |
setMaxObservedExponentialIterationCount(double maxObservedExponentialIterationCount)
Sets the maximum observed exponential iteration count.
|
void |
setPower(org.sm.smtools.math.complex.ComplexNumber power)
Sets the power for this fractal.
|
void |
setRootTolerance(double rootTolerance)
Sets the tolerance used for finding roots.
|
protected void |
streamLoadCustomParameters(java.io.DataInputStream dataInputStream)
Loads custom fractal parameters from a file as a stream.
|
protected void |
streamSaveCustomParameters(java.io.DataOutputStream dataOutputStream)
Saves custom fractal parameters to a file as a stream.
|
autoDetermineMaxNrOfIterations, convertComplexNumberToScreenLocation, convertComplexNumberToScreenLocation, convertScreenLocationToComplexNumber, convertScreenLocationToComplexNumber, evaluateFractalFunction, getBifurcationAxisZ1, getBifurcationAxisZ2, getBifurcationOutlierPercentileOffset, getBifurcationPoint, getCalculateAdvancedColoring, getCurrentZoomLevel, getDualParameter, getEscapeRadius, getExteriorGaussianIntegersTrapFactor, getExteriorOrbitTrapCrossStalksCentre, getExteriorOrbitTrapDiskCentre, getExteriorOrbitTrapDiskRadius, getExteriorOrbitTrapSineAdditiveFactor, getExteriorOrbitTrapSineMultiplicativeFactor, getExteriorOrbitTrapTangensAdditiveFactor, getExteriorOrbitTrapTangensMultiplicativeFactor, getExteriorStripingDensity, getFamilyName, getFractalType, getInteriorGaussianIntegersTrapFactor, getInteriorOrbitTrapCrossStalksCentre, getInteriorOrbitTrapDiskCentre, getInteriorOrbitTrapDiskRadius, getInteriorOrbitTrapSineAdditiveFactor, getInteriorOrbitTrapSineMultiplicativeFactor, getInteriorOrbitTrapTangensAdditiveFactor, getInteriorOrbitTrapTangensMultiplicativeFactor, getInteriorStripingDensity, getInvertYAxis, getMainFractalOrbitStartingPoint, getMaxBifurcationValue, getMaxNrOfIterations, getMinBifurcationValue, getNrOfBifurcationPoints, getNrOfBifurcationPointsPerOrbit, getNrOfBifurcationPointsToDiscard, getP1, getP2, getScreenBounds, getScreenHeight, getScreenWidth, getUseFixedNrOfIterations, iterateBifurcationDiagram, iterateDualFractal, iterateDualFractal, iterateMainFractal, iterateMainFractal, plainTextLoadParameters, plainTextSaveParameters, resetMainFractalOrbitStartingPoint, setBifurcationAxisZ1, setBifurcationAxisZ2, setBifurcationOutlierPercentileOffset, setCalculateAdvancedColoring, setComplexBounds, setDualParameter, setEscapeRadius, setExteriorGaussianIntegersTrapFactor, setExteriorOrbitTrapCrossStalksCentre, setExteriorOrbitTrapDiskCentre, setExteriorOrbitTrapDiskRadius, setExteriorOrbitTrapSineAdditiveFactor, setExteriorOrbitTrapSineMultiplicativeFactor, setExteriorOrbitTrapTangensAdditiveFactor, setExteriorOrbitTrapTangensMultiplicativeFactor, setExteriorStripingDensity, setFractalType, setInteriorGaussianIntegersTrapFactor, setInteriorOrbitTrapCrossStalksCentre, setInteriorOrbitTrapDiskCentre, setInteriorOrbitTrapDiskRadius, setInteriorOrbitTrapSineAdditiveFactor, setInteriorOrbitTrapSineMultiplicativeFactor, setInteriorOrbitTrapTangensAdditiveFactor, setInteriorOrbitTrapTangensMultiplicativeFactor, setInteriorStripingDensity, setInvertYAxis, setMainFractalOrbitStartingPoint, setMaxNrOfIterations, setNrOfBifurcationPointsPerOrbit, setNrOfBifurcationPointsToDiscard, setScreenBounds, setScreenBounds, setUseFixedNrOfIterations, streamLoadParameters, streamSaveParameters
protected org.sm.smtools.math.complex.ComplexNumber fPower
public static final org.sm.smtools.math.complex.ComplexNumber kMaxAlpha
public static final org.sm.smtools.math.complex.ComplexNumber kMinAlpha
public AConvergentFractalIterator()
AConvergentFractalIterator
object.protected org.sm.smtools.math.complex.ComplexNumber evaluateOrbit(org.sm.smtools.math.complex.ComplexNumber z, org.sm.smtools.math.complex.ComplexNumber c)
By default, this method calculates a complex numerical derivate for an arbitrary function, and then performs relaxed Newton-Raphson root finding.
z
- the complex variable zc
- the complex parameter cpublic final org.sm.smtools.math.complex.ComplexNumber getAlpha()
public final boolean getAutomaticRootDetectionEnabled()
boolean
indicating whether or not automatic root detection is enabledpublic java.lang.String getCustomFilenamePart()
getCustomFilenamePart
in class AFractalIterator
public org.sm.smtools.math.complex.ComplexNumber getDefaultDualParameter()
getDefaultDualParameter
in class AFractalIterator
public double getDefaultEscapeRadius()
getDefaultEscapeRadius
in class AFractalIterator
public org.sm.smtools.math.complex.ComplexNumber getDefaultP1()
getDefaultP1
in class AFractalIterator
public org.sm.smtools.math.complex.ComplexNumber getDefaultP2()
getDefaultP2
in class AFractalIterator
protected org.sm.smtools.math.complex.ComplexNumber getDefaultPower()
public final double getDerivativeDelta()
public final double getMaxObservedExponentialIterationCount()
public final org.sm.smtools.math.complex.ComplexNumber getPower()
public final double getRootTolerance()
protected org.sm.smtools.math.complex.ComplexNumber initialiseIterations(org.sm.smtools.math.complex.ComplexNumber z, org.sm.smtools.math.complex.ComplexNumber c)
This method returns c by default, thereby overriding user-specified initial starting values (making the dual fractal empty).
z
- the complex variable zc
- the complex parameter cprotected IterationResult iterate(org.sm.smtools.math.complex.ComplexNumber z, org.sm.smtools.math.complex.ComplexNumber c, boolean saveOrbit)
iterate
in class AFractalIterator
z
- the complex variable zc
- the complex parameter csaveOrbit
- a boolean
indicating whether or not the orbit should be savedprotected void plainTextLoadCustomParameters(org.sm.smtools.util.TextFileParser tfp) throws org.sm.smtools.exceptions.FileParseException
plainTextLoadCustomParameters
in class AFractalIterator
tfp
- a reference to the file parserorg.sm.smtools.exceptions.FileParseException
- in case a read error occursprotected void plainTextSaveCustomParameters(org.sm.smtools.util.TextFileWriter tfw) throws org.sm.smtools.exceptions.FileWriteException
plainTextSaveCustomParameters
in class AFractalIterator
tfw
- a reference to the file writerorg.sm.smtools.exceptions.FileWriteException
- in case a write error occurspublic final void setAlpha(org.sm.smtools.math.complex.ComplexNumber alpha)
The default value is 1.0; good values lie in the interval (0.1 - 0.85i) -> (1.85 + 0.85i).
alpha
- the alpha used for the relaxed Newton/Raphson root finding processpublic final void setAutomaticRootDetectionEnabled(boolean automaticRootDetectionEnabled)
automaticRootDetectionEnabled
- a boolean
indicating whether or not automatic root detection should be enabledpublic final void setDerivativeDelta(double derivativeDelta)
derivativeDelta
- the delta used for calculating the derivative.public final void setMaxObservedExponentialIterationCount(double maxObservedExponentialIterationCount)
maxObservedExponentialIterationCount
- the maximum observed exponential iteration countpublic final void setPower(org.sm.smtools.math.complex.ComplexNumber power)
power
- the power for this fractalpublic final void setRootTolerance(double rootTolerance)
rootTolerance
- the tolerance used for finding rootsprotected void streamLoadCustomParameters(java.io.DataInputStream dataInputStream) throws java.io.IOException
streamLoadCustomParameters
in class AFractalIterator
dataInputStream
- a data inputstreamjava.io.IOException
- in case a parse error occursprotected void streamSaveCustomParameters(java.io.DataOutputStream dataOutputStream) throws java.io.IOException
streamSaveCustomParameters
in class AFractalIterator
dataOutputStream
- a data outputstreamjava.io.IOException
- in case a write error occurs