日常の進捗

主に自分のための,行為とその習慣化の記録

樹木の年輪

コード

fullScreen();
translate(width/2, height/2);
noiseSeed(10111101);
float maxR = sqrt(width*width+height*height);
for (float r = maxR; r > 0; r -= maxR/100) {
  pushMatrix();
  beginShape();
  for (float angle = 0; angle < 360; angle += 360/150) {
    float x = cos(radians(angle))*r*noise(angle*0.01, r*0.001);
    float y = sin(radians(angle))*r*noise(angle*0.01, r*0.001);
    vertex(x, y);
  }
  endShape(CLOSE);
  popMatrix();
}