Chaotic Motion  1.0
Rucklidge.cs
1 using UnityEngine;
2 using System.Collections;
3 
4 // eqn (28) from http://lsc.amss.ac.cn/~ljh/04LCC.pdf
5 public class Rucklidge : ChaosEqn {
6 
7  private float a ;
8  private float l ;
9 
10  public Rucklidge() {
11  name = "Rucklidge";
12 
13  eqnStrings = new string[]{
14  "xdot = - a x + l y - y z",
15  "ydot = x",
16  "zdot = -z + y^2"
17  };
18 
19  paramBundles = new ParamBundle[] {
20  // sigma, b, rho
21  new ParamBundle("default (scaled)", 2f, 6.7f, 0f,
22  new Vector3(0f, 0.8f, 0f), new Vector3(-0.2f, 0f, -7.8f), 0.57f),
23  new ParamBundle("default", 2f, 6.7f, 0f,
24  new Vector3(0f, 0.8f, 0f)),
25  };
26 
27  paramNames = new string[] { "a", "l", ""};
28  slideShowSpeed = 2.5f;
29  }
30 
31  public override void SetParams(ParamBundle pb)
32  {
33  a = pb.eqnParam[0];
34  l = pb.eqnParam[1];
35  }
36 
37  public override void Function(ref float[] x_in, ref float[] x_out) {
38  x_out[0] = -a * x_in[0] + l * x_in[1] - x_in[1]*x_in[2];
39  x_out[1] = x_in[0];
40  x_out[2] = -x_in[2] + x_in[1]*x_in[1];
41  }
42 
43 }
override void Function(ref float[] x_in, ref float[] x_out)
Evaluate the first order evolution of the attractor, given the current position.
Definition: Rucklidge.cs:37
float[] eqnParam
parameters used in the equation
Definition: ParamBundle.cs:19
override void SetParams(ParamBundle pb)
Sets the parameter bunlde to be used by the system.
Definition: Rucklidge.cs:31
Chaos eqn. Base class for all equations that define a 3D chaotic system.
Definition: ChaosEqn.cs:9
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