Daily Generative Art - Rotating Circle

in art •  7 years ago  (edited)

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();
  }
}
Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!