fractalkitty looking for math? fractalkitty.com

Genuary 2026

genuary day 13

#random#trig#animation#accumulates#geometry#genuary

diam


let me;

function setup() {
  cnv = createCanvas(600, 600);
  describe(
    "a sketch with thousands and thousands of thin lines initially all horizontal with 2 circles that change size and color and rotate in their lines, and the rest horizontal. a triangle abstract figure sits on a horizon as the two circles move on the canvas making various shapes of lenses and lunes in their intersections. The feeling of an observer in a sketched universe."
  );
  strokeWeight(0.5);
}

function draw() {
  translate(width / 2, height / 2);
  for (let i = 0; i < 100; i++) {
    let x1 = random(-width / 1.5, 0);
    let x2 = random(0, width / 1.5);
    let y1 = random(-height / 2, height / 3);
    let c = random(120, 200);
    stroke(c, c * 1.7, c * 1.8, 20);
    line(x1, y1, x2, y1);
  }

  for (let i = 0; i < 100; i++) {
    let x1 = random(-width / 40, width / 40);
    let x2 = random(-width / 40, width / 40);
    let y1 = random(-20, 20);
    c = random(50, 180) + 100 * abs(sin(frameCount / 1000));
    push();
    rotate(frameCount / 500);
    translate(width / 4, 0);
    rotate(frameCount / 100000);

    stroke(c, c * 1.7, c * 1.8, 20);
    line(4 * sqrt(400 - y1 * y1), 4 * y1, -4 * sqrt(400 - y1 * y1), 4 * y1);
    pop();
  }
  let diam = width + 400 * abs(sin(frameCount / 500));
  for (let i = 0; i < 100; i++) {
    let x1 = random(-width / 40, width / 40);
    let x2 = random(-width / 40, width / 40);
    let y1 = random(-sqrt(diam), sqrt(diam));
    c = random(150, 180) + -100 * abs(sin(frameCount / 450));
    push();
    rotate(frameCount / 500);
    translate(
      width / 4 - (width / 3) * sin(frameCount / 300) * cos(frameCount / 400),
      0
    );

    stroke(c, c * 1.7, c * 1.8, 20);
    line(4 * sqrt(diam - y1 * y1), 4 * y1, -4 * sqrt(diam - y1 * y1), 4 * y1);
    pop();
  }

  for (let i = 0; i < 100; i++) {
    let x1 = random(-width / 1.5, 0);
    let x2 = random(0, width / 1.5);
    let y2 = random(height / 3, height / 2);
    let c = random(90, 120) + 50 * sin(frameCount / 1000);
    stroke(c, c * 1.7, c * 1.8, 20);
    line(x1, y2, x2, y2);
  }
  for (let i = 0; i < 300; i++) {
    let x1 = random(-width / 40, width / 40);
    let x2 = random(-width / 40, width / 40);
    let y1 = random(height / 3 - 50, height / 3);
    c = random(50, 140);

    stroke(c, c * 1.7, c * 1.8, 20);
    line(30 * cos(y1 / 100), y1, -30 * cos(y1 / 100), y1);
  }
}