fractalkitty looking for math? fractalkitty.com

100 days of code

phiBreathes

#trig#3d#animation#accumulates#math#symmetry

let n=100;
function setup(){
  createCanvas(windowWidth,windowHeight,WEBGL);
  angleMode(DEGREES);
  stroke(240,234,125);
  strokeWeight(0.1)
  
;
}
function draw(){
  t=frameCount
  for(let i=0;i<n;i++){
    fill(240-i, 234-i*3, 125+i*2,255*sin(t)*sin(t))
    push()
    rotate(i*137.5)
    translate(i*15,i*5,0)
 sphere(width/5+15*i*sin(t/2)*sin(t)*sin(t)-10*sin(t),9,3)
    pop()
  }
  camera(0,0,-2800)
}