Daily Generative Art - Rotating Circle

arttech(25)
Published in
#art
Words
28
Reading
1 min
Listen
Play
9y

Built in Processing. Click to view animation and code. Turning in on itself and on the Z-axis. Feel free to comment any questions on how it's made.
sketch_rotateCircle_122417.gif

Code:

void setup(){
  size(500, 500, P3D);
}

void draw(){
  background(255);

  ellipseMode(CENTER);
  noFill();
  
  for(int i=0; i<30; i++){
    pushMatrix();
    translate(width/2, height/2, map(sin(frameCount * 0.02), -1, 1, -width * 10, 0) * i * 0.02);
    rotateZ(frameCount * 0.01 - i * map(sin(frameCount * 0.02 + (i * 0.01)), -1, 1, -0.1000, 0.1000));
    rotateY(frameCount * 0.02 - i * map(sin(frameCount * 0.02 + (i * 0.02)), -1, 1, -0.1000, 0.1000));
    ellipse(0, 0, width-100, height-100);
    popMatrix();
  }
}
Daily Generative Art - Rotating Circle | Ecency