Xiaoyu Kang – Project 05 – Wallpaper

sketch


//Xiaoyu Kang
//xkang@andrew.cmu.edu
//Section B
//Project-05

var s1 = 20;
var s2 = 15;
var s3 = 10;
function setup(){
createCanvas(620, 620);
    noStroke();
}
 
function draw() {
    background(172,198,253);

//lines
    for (var a = 0; a < 620; a += 80){
    	fill(235,226,158);
        rect(a + 65,0,10,620);
    }
   
    //clouds
    for (var y = 0; y < 620; y += 4) {
        for (var x = 0; x < 620; x += 4) {
        	fill("white");
            ellipse(y * s1 + (s1 / 20) + 30, x * s1 + (s1 / 20) + 30,s1,s1);
            ellipse(y * s1 + (s1 / 20) + 15, x * s1+ (s1 / 20) + 30,s1,s1);
            ellipse(y * s1 + (s1 / 20) + 35, x * s1 + (s1 / 20) + 35,s1,s1);
            ellipse(y * s1 + (s1 / 20) + 25, x * s1 + (s1 / 20) + 38,s2,s2);
            ellipse(y * s1 + (s1 / 20) + 45, x * s1 + (s1 / 20) + 32,s2,s2);
        }   
    }
    
    //yellow stars
    for (var y = 0; y < 620; y += 4) {
        for (var x = 0; x < 620; x += 4) {
        	fill(243,246,202);
        	quad(y * s1 + (s1 / 20) + 25, x * s1 + (s1 / 20) + 72, y * s1 + (s1 / 20) + 29, x * s1 + (s1 / 20) + 66, y * s1 + (s1 / 20) + 33, x * s1 + (s1 / 20) + 72, y * s1 + (s1 / 20) + 29, x * s1 + (s1 / 20) + 78)
        }
    }
}

For this project, I was inspired by the wallpaper in my bedroom when I was young. I remembered that it consists of many white clouds printed over a blue canvas. So I tried to recreate that with some additional decorations to make the drawing look more diverse.

 

Leave a Reply