Class AizawaEquations
java.lang.Object
edu.cnu.mdi.mdi3D.view3D.aizawaDemo.AizawaEquations
- All Implemented Interfaces:
org.apache.commons.math3.ode.FirstOrderDifferentialEquations
public class AizawaEquations
extends Object
implements org.apache.commons.math3.ode.FirstOrderDifferentialEquations
Implements the six-parameter Aizawa attractor as a system of three
first-order ordinary differential equations.
The state vector is:
y[0] = x y[1] = y y[2] = zand the governing equations are:
dx/dt = (z - b) x - d y dy/dt = d x + (z - b) y dz/dt = c + a z - z^3 / 3 - (x^2 + y^2)(1 + e z) + f z x^3This is the more commonly used Aizawa system for the familiar strange-attractor visualizations.
The class is immutable and thread-safe after construction.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final doubleDefault value of parameter a.static final doubleDefault value of parameter b.static final doubleDefault value of parameter c.static final doubleDefault value of parameter d.static final doubleDefault value of parameter e.static final doubleDefault value of parameter f.static final intThe dimension of the Aizawa system. -
Constructor Summary
ConstructorsConstructorDescriptionCreates an Aizawa system using standard demo parameters.AizawaEquations(double a, double b, double c, double d, double e, double f) Creates an Aizawa system with the specified parameter values. -
Method Summary
Modifier and TypeMethodDescriptionvoidcomputeDerivatives(double t, double[] y, double[] yDot) Computes the time derivatives of the Aizawa state vector.static double[]Returns a fresh default initial state for integrations of this system.doublegetA()Gets parameter a.doublegetB()Gets parameter b.doublegetC()Gets parameter c.doublegetD()Gets parameter d.intReturns the number of coupled first-order equations in the system.doublegetE()Gets parameter e.doublegetF()Gets parameter f.
-
Field Details
-
DEFAULT_A
public static final double DEFAULT_ADefault value of parameter a.- See Also:
-
DEFAULT_B
public static final double DEFAULT_BDefault value of parameter b.- See Also:
-
DEFAULT_C
public static final double DEFAULT_CDefault value of parameter c.- See Also:
-
DEFAULT_D
public static final double DEFAULT_DDefault value of parameter d.- See Also:
-
DEFAULT_E
public static final double DEFAULT_EDefault value of parameter e.- See Also:
-
DEFAULT_F
public static final double DEFAULT_FDefault value of parameter f.- See Also:
-
DIMENSION
public static final int DIMENSIONThe dimension of the Aizawa system.The state contains the three coordinates
x,y, andz.- See Also:
-
-
Constructor Details
-
AizawaEquations
public AizawaEquations()Creates an Aizawa system using standard demo parameters. -
AizawaEquations
public AizawaEquations(double a, double b, double c, double d, double e, double f) Creates an Aizawa system with the specified parameter values.- Parameters:
a- the linear coefficient multiplyingzindz/dtb- the shift applied tozin thexandyequationsc- the constant driving term indz/dtd- the rotation-like coupling betweenxandye- the coefficient in the nonlinear factor(1 + e z)f- the coefficient of the nonlinear termz x^3indz/dt
-
-
Method Details
-
defaultInitialState
public static double[] defaultInitialState()Returns a fresh default initial state for integrations of this system.A new array is returned on each call so that client code can modify the returned state safely without changing shared static data.
- Returns:
- a new three-element array containing a standard initial condition
-
getDimension
public int getDimension()Returns the number of coupled first-order equations in the system.- Specified by:
getDimensionin interfaceorg.apache.commons.math3.ode.FirstOrderDifferentialEquations- Returns:
- always 3
-
computeDerivatives
public void computeDerivatives(double t, double[] y, double[] yDot) throws org.apache.commons.math3.exception.MaxCountExceededException Computes the time derivatives of the Aizawa state vector.The input state array is interpreted as:
state[0] = x state[1] = y state[2] = z
and the output derivative array is filled as:yDot[0] = dx/dt yDot[1] = dy/dt yDot[2] = dz/dt
- Specified by:
computeDerivativesin interfaceorg.apache.commons.math3.ode.FirstOrderDifferentialEquations- Parameters:
t- the independent variable, usually time; unused here because the system is autonomousy- the current state vectoryDot- the array to receive the computed derivatives- Throws:
org.apache.commons.math3.exception.MaxCountExceededException- if the Commons Math integrator signals an evaluation limit problem
-
getA
public double getA()Gets parameter a.- Returns:
- parameter a
-
getB
public double getB()Gets parameter b.- Returns:
- parameter b
-
getC
public double getC()Gets parameter c.- Returns:
- parameter c
-
getD
public double getD()Gets parameter d.- Returns:
- parameter d
-
getE
public double getE()Gets parameter e.- Returns:
- parameter e
-
getF
public double getF()Gets parameter f.- Returns:
- parameter f
-