fractalkitty looking for math? fractalkitty.com

weekly creative coding

where I live

#random#trig#image#animation#poem#number-theory#body#time#wcc


let me;
function setup() {
  angleMode(DEGREES);
  background(0);
  createCanvas((550 * me.width) / me.height, 550);
}
function draw() {
  t = (frameCount / 5) % 360;
  background(20, 20, 20, 2);
  noStroke();
  for (let i = 1; i < 30000; i += 10) {
    fill(random(20, 100));
    x = width / 2 + 10 + sqrt(i * 4) * sin(t * 10 + i / 2 + random(5));
    y = width / 3 + 20 + sqrt(i * 4) * cos(t * 10 + i / 2 + random(5));
    pix = color(me.get(me.width / (width / x), me.height / (height / y)));
    pix.setAlpha(random(150));
    fill(pix);
    circle(x, y, random(0, 5 + 5 * sin(t)));
  }
}
function preload() {
  me = loadImage("/assets/FullSizeRender%203.jpg");
}