fractalkitty looking for math? fractalkitty.com

all

Sporadic Group

#random#trig#grid#interactive#animation#math#number-theory#mathober

mONsTerdrawGrid

let t = 0;
let n = 25;

function setup() {
  createCanvas(500, 500);
  background(255);
  describe(
    "The Monster group digits represented as arcs for each power of 10 with the largest on the outer arc and smallest as inner. The digit is then shown by how long the arc is. All of them are spinning sporadically. This is drawn on staticky radial graph paper."
  );
  rectMode(CENTER);
  strokeWeight(0.5);
  strokeCap(SQUARE);
  t = random(-10, 10);
}

function draw() {
  background(245, 250, 255, 20);
  translate(width / 2, height / 2);
  stroke(100, 110, 120, 10);
  drawGrid();
  t += 0.0005;
  mONsTer();
  strokeWeight(1);
  noFill();
  stroke(100, 110, 120, 30);
  rect(0, 0, width / 1.02, width / 1.02);
  rect(0, 0, width / 1.04, width / 1.04);
}

function mONsTer() {
  push();
  noFill();
  strokeWeight(width / 1.04 / 54 / 2);
  for (let i = 0; i < MONSTER.length; i++) {
    push();
    rotate(t + 2 * PI * sin(MONSTER[i]) * cos(t / 100 - MONSTER[i] - t - i));
    stroke(40 + i * 3, 50 + i * 3, 60 + i * 3, 100);

    arc(
      0,
      0,
      width / 1.04 - (width / 1.04 / 53) * i,
      width / 1.04 - (width / 1.04 / 53) * i,
      0,
      (PI * 2 * MONSTER[i]) / 9
    );
    pop();
  }

  pop();
}

function drawGrid() {
  for (let i = 0; i < n; i++) {
    rotate((2 * PI) / n);
    line(-width / 1.5, 0, width / 1.5, 0);
    circle(0, 0, (width / n) * 2 * i);
  }
  noStroke();
  for (let i = 0; i < 500; i++) {
    x = random(-width / 2, width / 2);
    y = random(-width / 2, width / 2);
    fill(245, 250, 255, 150);
    circle(x, y, 2);
  }
}

function mousePressed() {
  setup();
  draw();
}

MONSTER = [
  8,
  0,
  8,
  0,
  1,
  7,
  4,
  2,
  4,
  7,
  9,
  4,
  5,
  1,
  2,
  8,
  7,
  5,
  8,
  8,
  6,
  4,
  5,
  9,
  9,
  0,
  4,
  9,
  6,
  1,
  7,
  1,
  0,
  7,
  5,
  7,
  0,
  0,
  5,
  7,
  5,
  4,
  3,
  6,
  8,
  0,
  0,
  0,
  0,
  0,
  0,
  0,
  0,
  0
];