Sean Meng-Project 05- Wall paper

hmeng-project 05

//Sean Meng
//Section C
//hmeng@andrew.cmu.edu
//Project-05-Wall paper

var xS = 55;//define x spacing for each feather
var yS = 65;//define y spacing for each feather

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

function draw() {
	background(0);
    
    for(var x = 1; x <= 8; x += 1){
        for(var y = 1; y <= 7; y += 1){           
            //draw feathers on the even number rows
            if(y % 2 == 0){
                stroke(255);
                strokeWeight(0.5);
                //the branches of the feather
                line(x * xS, y * yS + 30, x * xS, y * yS + 500)
                //outter green part of the feather
                fill(31, y * 30, 111);//color gradiant from blue to green
                ellipse(x * xS, y * yS, 30, 60);
                //inner yellow layer of the feather
                fill(242, 250, 130);
                ellipse(x * xS, y * yS + 8, 20, 40);
                //inner orange layer of the feather
                fill(255, 163, 51);
                ellipse(x * xS, y * yS + 8, 15, 30);
                //inner light blue layer of the feather
                fill(51, 228, 255);
                ellipse(x * xS, y * yS + 14, 10, 10);
                //inner dark blue layer of the feather
                fill(17, 24, 214);
                ellipse(x * xS, y * yS + 12, 7, 7);

            } 
            //draw feathers on the odd number rows
            else if(x <= 9){
                stroke(255);
                strokeWeight(0.5);
                //the branches of the feather
                line(x * xS + xS / 2, y * yS - 20, x * xS + xS / 2, y * yS - 500)
                fill(y * 50, 196, 111);//color gradiant from green to orange
                ellipse(x * xS + xS / 2, y * yS, 20, 40);
            }            
        }
    }

    
}

The drawing is inspired by the repeating pattern of peacock feather. By adding layers of color, gradient and shape, the form of the feather can be abstracted as wall paper

Leave a Reply