Chaotic Motion  1.0
SprottL.cs
1 using UnityEngine;
2 using System.Collections;
3 
4 // eqn (44) from http://lsc.amss.ac.cn/~ljh/04LCC.pdf
5 // Primary ref: http://sprott.physics.wisc.edu/pubs/paper212.pdf
6 
7 public class SprottL : ChaosEqn {
8 
9  public SprottL() {
10  name = "SprottL";
11 
12  eqnStrings = new string[]{
13  "xdot = y + 3.9z",
14  "ydot = 0.9x^2 - y ",
15  "zdot = 1 - x"
16  };
17 
18  paramBundles = new ParamBundle[] {
19  // sigma, b, rho
20  new ParamBundle("default (scaled)", 0f, 0f, 0f,
21  new Vector3(.1f, .1f, .1f), new Vector3(0.3f,-10.5f,3.4f), 0.35f),
22  new ParamBundle("default", 0f, 0f, 0f,
23  new Vector3(.1f, .1f, .1f)),
24  };
25 
26  paramNames = new string[] { ChaoticSystem.NO_PARAM, ChaoticSystem.NO_PARAM,ChaoticSystem.NO_PARAM};
27  slideShowSpeed = 2f;
28  }
29 
30  public override void SetParams(ParamBundle pb)
31  {
32  }
33 
34  public override void Function(ref float[] x_in, ref float[] x_out) {
35  x_out[0] = x_in[1] + 3.9f*x_in[2];
36  x_out[1] = 0.9f*x_in[0]*x_in[0] - x_in[1];
37  x_out[2] = 1 - x_in[0];
38  }
39 
40 }
Chaotic system. Base class for chaotic scripts. Holds the type of system selected, the parameter set or the custom parameters to be used.
override void Function(ref float[] x_in, ref float[] x_out)
Evaluate the first order evolution of the attractor, given the current position.
Definition: SprottL.cs:34
override void SetParams(ParamBundle pb)
Sets the parameter bunlde to be used by the system.
Definition: SprottL.cs:30
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