Project 5: Wallpaper

sketchDownload

// Yash Mittal
// Section D

var x = 95;
var y = 95;

function setup() {
    createCanvas(600, 600);
    background (232, 217, 203);

    noLoop();
}

function draw() { 

    for (var col = 0.95; col <= 10; col = col + 2) {

        for (var row = 1.3; row <= 9; row = row + 2) {

           lion (x * 0.8 * col, y * row); 
        }
    }

}


function lion (x, y) {

    noStroke();

    fill (250, 68, 9);
    ellipse (x - 35, y + 35, 50, 50); // mane circle 1
    ellipse (x - 55, y + 2, 43, 45); // mane circle 2
    ellipse (x - 43, y - 39, 55, 50); // mane circle 3
    ellipse (x - 10, y - 63, 53, 53); // mane circle 4
    ellipse (x + 32, y - 50, 53, 53); // mane circle 5
    ellipse (x + 52, y - 10, 50, 50); // mane cirlce 6
    ellipse (x + 40, y + 30, 50, 50); // mane circle  7
    ellipse (x + 5, y + 50, 55, 55); // mane circle 8

    fill (254, 146, 9); // orange face 
    ellipse (x, y, 96, 90); // background of face  

    fill (59, 23, 9); // dark brown  
    ellipse (x - 25, y, 8, 12); // left eye
    ellipse (x + 25, y, 8, 12); // right eye

    fill (255, 209, 53); 
    ellipse (x, y + 5, 16, 35); // nose highlight 

    fill (255);
    ellipse (x, y + 20, 33, 22); // mouse background 

    fill (53, 22, 3);
    ellipse (x, y + 13, 20, 8); // nose

    rect (x - 1, y + 13, 1, 9); // line from nose to mouth

    strokeWeight (1);
    stroke (53, 22, 3);
    line (x - 6, y + 23, x + 6, y + 21); // mouth smile

    fill (255);
    noStroke ();
    ellipse (x - 26.5, y - 3, 3, 5); // left eye highlight
    ellipse (x + 23.5, y - 3, 3, 5); // right eye highlight

    fill (255, 170, 187); 
    ellipse (x - 25, y + 15, 12, 12); // left cheek highlights
    ellipse (x + 25, y + 15, 12, 12); // right cheek highlights

    fill (254, 146, 9);
    ellipse (x - 30, y - 40, 18, 18); // left ear base 
    ellipse (x + 30, y - 40, 18, 18); // right ear base

    fill (255, 209, 53);
    ellipse (x - 30, y - 40, 10, 10); // left ear highlight
    ellipse (x + 30, y - 40, 10, 10); // right ear highlight

     
}

I made a lion wallpaper for this project. I started off with drawing my ideas out and then I started making the different elements of the face. Next, I created the loops to repeat the pattern, which took a little bit of time because I got confused with the numbers.

Leave a Reply