Wallpaper

I liked the overlapping shapes and the contrast between the colors and the types of shapes used.

 

indexsketch

<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <title>p5.js vers 0.5.2, Edit index.html to Change This Title</title>
    <script src="http://cdnjs.cloudflare.com/ajax/libs/p5.js/0.5.2/p5.js"></script>

    <!-- Uncomment the lines below to include extra p5 libraries, or 
         use template-all or template-all-min:
    <script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.5.2/addons/p5.dom.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.5.2/addons/p5.sound.js"></script>
    -->

    <script src="sketch.js" type="text/javascript"></script>
  </head>
  <body>
  </body>
</html>
//Arula Ratnakar
//Section C
//aratnaka@andrew.cmu.edu
//wallpaper



function setup() {
    createCanvas(640, 400);
   
}
function draw (){

    for (var x=10; x<width; x+=10) {//creates the overlapping shapes
        for (var y=10; y < height; y+=100) {
            wallpaper(x,y)
        }
    }
    
}

function wallpaper (x,y) {
	fill (134, 185, 50)
    ellipse (x, y, 50,50)
    fill (200,200,255)
    rect (x, y, x+5, x+5, 50,50)

}

Leave a Reply