fractalkitty looking for math? fractalkitty.com

Mathober 2026 ยท day 8, Parabolic Rotation

Parabolic Rotation

#random#trig#interactive#animation#accumulates

theNumberOfFriends

let t=0
let theNumberOfFriends=20
function setup() {
	theSizeThatFits = min(windowWidth, windowHeight)*0.9
	theCanvasThatIsFilled=createCanvas(theSizeThatFits, theSizeThatFits);
	background(20,70,80);
noStroke()
	describe("star-like petals rotate with sketchy chalk texture and drawn through colors on the radial lines with different shades of teal")
}

function draw() {
  translate(width/2,width/2)
  	for(let i=0;i<theNumberOfFriends;i++){
      push()
      a = i*2*PI/theNumberOfFriends+frameCount/700
      rotate(a)
      fill(20+60*abs(cos(i-a*2)),70+130*abs(cos(i-a*2)),80 +140*abs(cos(i-a*2)),50)
      for(let j = -width/2;j<width/2;j+=3){
        x = j+random(-0.5,0.5)
        circle(x,x*x/100,1+random(2))
      }

      pop()
    }
}

function keyPressed(){
	if(keyCode===83){
		save(theCanvasThatIsFilled,"rotation","png")
	}
}