fractalkitty looking for math? fractalkitty.com

100 days of code

conchoidOcean

#trig#animation#math#parametric#sea

conchoid

let a=0;
function setup(){
  cnv=createCanvas(windowWidth,windowHeight)
  background(20)
  stroke(255)
  noFill()
  strokeWeight(0.05)
}
function draw(){
  background(0)
  translate(width/2,height/2);
  for(let i=-9;i<=9;i++){
   conchoid(a+i);
    conchoid(a+i);
  }
  a=9*sin(frameCount/100);
}
function conchoid(a){
  beginShape();
  for(let i=0;i<356;i++){
    y=width/60*(1/cos(i)+a*cos(i))*cos(i);
    x=width/60*(1/cos(i)+a*cos(i))*sin(i);
    vertex(x,y)
  }
  endShape() 
}