Thursday, December 31, 2020

Chaotic Maps in Processing 3, The Sinai Map

The pattern is generated with the following code:

//Attractors
float a = 2.25;
//Initial values
float x = 1;
float y = 1;
void setup() {
  frameRate(60);
  size(800,600);
  colorMode(RGB, 255, 255, 255);
  background(0);
  stroke(255, 255, 255);
  strokeWeight(0.125);
}
void draw() {
  float dx = (x + y + a * cos(TAU * y)) % 1;
  float dy = (x + 2 * y) % 1;
  x = dx;
  y = dy;
  translate(width / 2, height / 2);
  point(x * 96, y * 96);
}

It creates the following image:


 


Friday, December 11, 2020

Chaotic Maps in Processing 3, The Gingerbread Man Map

Just in time for the season! The pattern is generated with the following code:

//Attractors
float a = 1;
float b = a;
//Initial values
float x = 0.125;
float y = - x;
void setup() {
  frameRate(60);
  size(800,600);
  colorMode(RGB, 255, 255, 255);
  background(0);
  stroke(255, 255, 255);
  strokeWeight(0.125);
}
void draw() {
  float dx = 1 - a * y + b * abs(x);
  float dy = x;
  x = dx;
  y = dy;
  translate(width / 2, height / 2);
  point((x - 1) * 32, (y - 1) * 32);
}

It creates the following image:


 

Chaotic Maps in Processing 3, The Business Cycle Map

The pattern is generated with the following code:

//Attractors
float a = 1;
float b = a;
//Initial values
float x = 0.125;
float y = x;
void setup() {
  frameRate(60);
  size(800,600);
  colorMode(RGB, 255, 255, 255);
  background(0);
  stroke(255, 255, 255);
  strokeWeight(0/125);
}
void draw() {
  float dx = x + y;
  float dy = (a * y) - (a + 1) * pow(y, 3) - (b * x);
  x = dx;
  y = dy;
  translate(width / 2, height / 2);
  point(x * 80, y * 80);
}

It creates the following image:


 

Thursday, December 10, 2020

Chaotic Maps in Processing 3, The Sine-Sine Map

Short post. I'll make some more when I render more. I should really be updating this blog more too, I have been doing a lot in chaos-theory-related areas of math.

The pattern is generated with the following code:

//Attractors
float a = 2.75;
//Initial values
float x = 0.125;
float y = x;
void setup() {
  frameRate(60);
  size(800,600);
  colorMode(RGB, 255, 255, 255);
  background(0);
  stroke(255, 255, 255);
  strokeWeight(0.125);
}
void draw() {
  float dx = sin(x) - sin(a * y);
  float dy = x;
  x = dx;
  y = dy;
  translate(width / 2, height / 2);
  point(x * 80, y * 80);
}

It creates the following image: