Paul Greenway – Project 05 – Wallpaper

pgreenwa_wallpaper

/*Paul Greenway
Section 1A
pgreenwa@andrew.cmu.edu
Project-05-Wallpaper
*/


function setup() {
  createCanvas(580, 580);
}

//background
function draw() {
   background('white');
   
      
          
  //small background circles
  strokeWeight(1);
  for (var x = 0; x < 70; x++) {
    for (var y = 0; y < 70; y++) {
      fill('white');
      ellipse(10*x, 10*y, 10, 10);
      
    }
  }
  //black lines + circles
  strokeWeight(1);
  for (var x = 0; x < 11; x++) {
    for (var y = 0; y < 20; y++) {
      fill('black');   
      ellipse(50*x+40, 50*y + 40, 10, 10);
      rect(1*x, 50*y+14, 1000,2);
      rect(1*x, 50*y+39, 1000,2);
    }
  }
  //red outer rings
  strokeWeight(1);
  for (var y = 0; y < 10; y++) {
      for (var x = 0; x < 11; x++) {

        if (y % 2 !=0) {
          fill('red');
          ellipse(50*x+40, 50*y+40, 50, 50);
        }
      }
  }
    //inner gradient circles
    for (var y = 0; y < 10; y++) {
      for (var x = 0; x < 11; x++) {

        if (y % 2 !=0) {
          fill('white');
          ellipse(50*x+40, 50*y+40, 40, 40);
          fill(200,20*x,20*y);
          ellipse(50*x+40, 50*y+40, 25, 25);
        
          
        }
      }
  }
      strokeWeight(0);
      for (var y = 0; y < 11; y++) {
      for (var x = 0; x < 10; x++) {

        if (y % 2 ===0) {
          fill(30);
          ellipse(50*x+65, 50*y+40, 20, 25);
          
        }
      }
  }
}

For this project I wanted to created a symmetrical pattern that would have gradient colored circles based on their position within the grid. To segment these colored circles I added black lines with smaller white circles in the background to add more visual interest.

Leave a Reply