fractalkitty looking for math? fractalkitty.com

Mathober 2021

hSpace

#trig#interactive#animation#math#wave#mathober

let s=0.01;
let c=0.5;
function setup(){
  createCanvas(windowWidth,windowHeight);
  strokeWeight(4)
}

function draw(){
  background(255,255,255,5);
  t=frameCount/50;
  translate(0,height/2)
  noFill()
  beginShape()
  for(let i=0;i<TWO_PI;i=i+s){
    x=i*(width/(TWO_PI));
    y=-100*sin(i*c)*sin(t);
    vertex(x,y)
  }
  endShape()
}

function mousePressed(){
  if(c<21){
    c++
  }
  else{c=0.5}
}