fractalkitty looking for math? fractalkitty.com

100 days of code

lightPetals

#trig#animation#math#polar#plants

function setup(){
  createCanvas(600,600);
  background(0,0,0);
  strokeWeight(0.05);
  stroke(255);
}
function draw(){
  background(0,0,0,0.5);
  translate(300,300);
  t=frameCount;
  rotate(t*PI/4);
  a=-200*sin(t);
  b=200*cos(t);
  triangle(a*sin(t),a*cos(t),b*sin(t),b*cos(t))
  push()
  triangle(-a*sin(t),-a*cos(t),-b*sin(t),-b*cos(t))
  pop()
  
}