rossler_osc

Rossler chaotic attractor - oscillator https://en.wikipedia.org/wiki/R%C3%B6ssler_attractor
Author: JLS
License: BSD
Github: jls/osc/rossler_osc.axo

Inlets

bool32.rising reset

bool32 active

Outlets

frac32buffer.bipolar axis x

frac32buffer.bipolar axis y

frac32buffer.bipolar axis z

Declaration
float x;
float tx;
float y;
float ty;
float z;
float tz;
float a;
float b;
float c;
float dt;
int res;
Init
x = 0.1;
y = 0.1;
z = 0.1;
a = 0.2;
b = 0.2;
c = 14.0;
dt = 0.005;
res = 0;
Audio Rate
if (inlet_active > 0) {

  tx = -y - z;
  ty = x + a * y;
  tz = b + z * (x - c);

  x = x + tx * dt;
  y = y + ty * dt;
  z = z + tz * dt;

  outlet_x = (int32_t)(x * (1 << 22));
  outlet_y = (int32_t)(y * (1 << 22));
  outlet_z = (int32_t)(z * (1 << 20));

}

else {

  outlet_x = 0;
  outlet_y = 0;
  outlet_z = 0;
}

if ((inlet_reset > 0) && !res) {

  res = 1;
  x = 0.1;
  y = 0.1;
  z = 0.1;

} else if (!(inlet_reset > 0))
  res = 0;

Privacy

© 2024 Zrna Research