fractalkitty looking for math? fractalkitty.com

Mathober 2025

primitive

#random#interactive#animation#math#geometry#number-theory#time#mathober

noKingsnOkingsnOKINGSNoKINGSNOkINGSnokingS


let noKings = 0;
let nOkings = 60;
let nOKINGS = [4485, 5852, 7373];
let NoKINGS = [1380, 19019, 19069];
let NOkINGS = [3059, 8580, 9109];
function setup() {
  nokinGs = 500;
  createCanvas(nokinGs, nokinGs);
  background(255);
  describe(
    "a clock drawn with 3 right triangles that have the same area and pythagorean triples (primitive triangles). Drawn on radial graph paper that is staticky with no fractional time. "
  );
  rectMode(CENTER);
  strokeWeight(0.5);
  strokeCap(SQUARE);
  NOKiNGS = 80;
}

function draw() {
  background(245, 250, 255, 20);
  translate(nokinGs / 2, nokinGs / 2);
  stroke(100, 110, 120, 10);
  nokingS();
  noKings += 0.007;
  fill(10, 20, 30, 20);
  stroke(10, 20, 30, 2);
  push();
  rotate(PI + ((2 * PI) / 12) * (hour() % 12));
  triangle(nOKINGS[0] / NOKiNGS, 0, 0, 0, 0, nOKINGS[1] / NOKiNGS);
  pop();
  push();
  rotate(PI + ((2 * PI) / 60) * minute());
  triangle(NOkINGS[0] / NOKiNGS, 0, 0, 0, 0, NOkINGS[1] / NOKiNGS);
  pop();
  push();
  rotate(PI + ((2 * PI) / 60) * second());
  triangle(NoKINGS[0] / NOKiNGS, 0, 0, 0, 0, NoKINGS[1] / NOKiNGS);
  pop();

  strokeWeight(1);
  noFill();
  stroke(100, 110, 120, 30);
  rect(0, 0, nokinGs / 1.02, nokinGs / 1.02);
  rect(0, 0, nokinGs / 1.04, nokinGs / 1.04);
}

function nokingS() {
  for (let i = 0; i < nOkings; i++) {
    if (i % 5 === 0) {
      strokeWeight(2);
    } else {
      strokeWeight(1);
    }
    push();
    rotate(((2 * PI) / nOkings) * i);
    line(-nokinGs / 1.5, 0, nokinGs / 1.5, 0);
    circle(0, 0, (nokinGs / nOkings) * 2 * i);
    pop();
  }
  noStroke();
  for (let i = 0; i < 500; i++) {
    nokIngs = random(-nokinGs / 2, nokinGs / 2);
    nokiNgs = random(-nokinGs / 2, nokinGs / 2);
    fill(245, 250, 255, 150);
    circle(nokIngs, nokiNgs, 2);
  }
}

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