Daily Creative Coding

元「30 min. Processing」。毎日、Creative Codingします。

重なる透明な円

/**
* Overlapping Transparent Circles
*
* @author aa_debdeb
* @date 2015/10/13
*/

void setup(){
  size(500, 500);
  smooth();
  frameRate(24);
  
  background(0);
  stroke(0, 112, 142, 50);
  noFill();
  translate(100, 100);
  for(int x = 0; x <= 300; x++){
    for(int y = 0; y <= 300; y++){
      if(x % 30 == 0 || y % 30 == 0){
        ellipse(x, y, 20, 20);
      }
      if(x % 60 == 0 || y % 60 == 0){
        ellipse(x, y, 60, 60);
      }
      if(x % 100 == 0 || y % 100 == 0){
        ellipse(x, y, 100, 100);
      }
    }
  }
  
}