Christine Kim – Project-05

sketch

//Christine Kim
//Section A (9:00)
//haewannk@andrew.cmu.edu
//Project-05


var f = 30;
var d = 10;

function setup() {
    createCanvas(600, 600);
    background("#FFEB94");
    noLoop();
    
}

function draw() {
    noStroke();

    for(var x1=30; x1<width; x1+=90) {
        for(var y1=20; y1<height; y1+=90) {
            icecream(x1,y1);
        }
    }

    for(var x2=30; x2<width; x2+=90) {
        for(var y2=15; y2<height; y2+=90) {
            cones(x2,y2);
        }
    }

    for(var x3=75; x3<width; x3+=90) {
        for(var y3=75; y3<height; y3+=90) {
            fill("#FFCCAC")
            ellipse(x3,y3,d,d);
        }
    }
}

function icecream(x1,y1) {
    fill("#C1E1DC");
    ellipse(x1,y1,f,f);
}

function cones(x2,y2) {
    fill("#D5C3AA");
    triangle(x2-15,y2+10,x2,y2+50,x2+15,y2+10);
}

I was inspired by the ice cream cone I was eating at night.

img_1228

Leave a Reply