Chaotic Motion  1.0
Arneodo.cs
1 using UnityEngine;
2 using System.Collections;
3 
4 // see http://iats09.karabuk.edu.tr/press/bildiriler_pdf/iats09_02-01_468.pdf
5 // does not match CA picture
6 public class Arneodo : ChaosEqn {
7 
8  private float a;
9  private float b;
10  private float c;
11  private float d;
12 
13  public Arneodo() {
14  name = "Arneodo";
15 
16  eqnStrings = new string[]{
17  "xdot = y",
18  "ydot = z",
19  "zdot = -a x - b y - c z + d x^3 "
20  };
21 
22  paramBundles = new ParamBundle[] {
23  new ParamBundle("default (scaled)", new float[]{-5.5f, 3.5f, 1f, -1f},
24  new Vector3(0.5f, -1f, 0.5f), new Vector3(00.0f,00.1f,00.2f), 0.46f),
25  new ParamBundle("default", new float[]{-5.5f, 3.5f, 1f, -1f},
26  new Vector3(0.5f, -1f, 0.5f)),
27  };
28 
29  paramNames = new string[] { "a", "b", "c", "d"};
30  slideShowSpeed = 1f;
31  }
32 
33  public override void SetParams(ParamBundle pb)
34  {
35  a = pb.eqnParam[0];
36  b = pb.eqnParam[1];
37  c = pb.eqnParam[2];
38  d = pb.eqnParam[3];
39  }
40 
41 
42 
43  public override void Function(ref float[] x_in, ref float[] x_out) {
44 
45  x_out[0] = x_in[1];
46  x_out[1] = x_in[2];
47  x_out[2] = - a*x_in[0]- b*x_in[1] - c*x_in[2] + d*x_in[0]*x_in[0]*x_in[0];
48  }
49 
50 }
override void Function(ref float[] x_in, ref float[] x_out)
Evaluate the first order evolution of the attractor, given the current position.
Definition: Arneodo.cs:43
float[] eqnParam
parameters used in the equation
Definition: ParamBundle.cs:19
Chaos eqn. Base class for all equations that define a 3D chaotic system.
Definition: ChaosEqn.cs:9
override void SetParams(ParamBundle pb)
Sets the parameter bunlde to be used by the system.
Definition: Arneodo.cs:33
Parameter bundle. Container class to hold the values for starting a chaotic system. Holds the parameters for the equations and the initial position and scale values.
Definition: ParamBundle.cs:13