fractalkitty looking for math? fractalkitty.com

Mathober 2025

digraph sink

#random#trig#animation#math#mathober

points1points2

let t = 0;
let points1, points2, r1, r2;
function setup() {
  createCanvas(500, 500);
  background(255);
  describe(
    "a circle of smaller points connected to half of the number of points in a smaller circle of points that are connected to a center point on a radial graph paper canvas with static so it looks like the graph is moving. The sink is only shown by the radius of the circles where the smallest points are on the outside and the center point is the largest"
  );
  noFill();
  rectMode(CENTER);
}

function draw() {
  background(245, 250, 255, 30);
  t += 0.01;
  translate(width / 2, height / 2);
  n = 25;
  d = width / n;
  stroke(100, 110, 120, 10);
  for (let i = 0; i < n; i++) {
    push();
    rotate(((2 * PI) / n) * i);
    strokeWeight(0.5);
    line(-width / 1.5, 0, width / 1.5, 0);

    circle(0, 0, (width / n) * 2 * i);
    pop();

    for (let i = 0; i < 500; i++) {
      push();
      strokeWeight(1);
      stroke(245, 250, 255);
      fill(245, 250, 255);
      x = random(-width / 2, width / 2);
      y = random(-width / 2, width / 2);
      circle(x, y, 1);
      pop();
    }

    stroke(75, 85, 95, 20);
    fill(75, 85, 95);

    strokeWeight(0.5);

    noFill();
  }
  strokeWeight(3);
  fill(75, 85, 95);
  circle(0, 0, 15);
  s = (width / n) * 8;
  for (let i = 0; i < 50; i++) {
    if (i % 2 === 0) {
      x1 = (s * cos((i * 2 * PI) / 50)) / 2;
      y1 = (s * sin((i * 2 * PI) / 50)) / 2;
      circle(x1, y1, 10);
    } else {
      x1 = (s * cos(((i + 1) * 2 * PI) / 50)) / 2;
      y1 = (s * sin(((i + 1) * 2 * PI) / 50)) / 2;
    }
    x2 = s * cos((i * 2 * PI) / 50);
    y2 = s * sin((i * 2 * PI) / 50);
    circle(x2, y2, 5);
    x3 = s * cos((i * 2 * PI) / 50);
    y3 = s * sin((i * 2 * PI) / 50);
    line(x2, y2, x1, y1);
    line(0, 0, x1, y1);
  }
  noFill();
  strokeWeight(1);
  stroke(100, 110, 120, 30);
  rect(0, 0, width / 1.02, width / 1.02);
  rect(0, 0, width / 1.04, width / 1.04);
}