PO4 – Alexander Chen

sketch

//Alexander Chen
//Section A
//alchen1@andrew.cmu.edu
//Project 04

function setup() {
    createCanvas(400, 300);
}

function draw() {
	background(0);

    var x = 0;
    var y = 0;
    var x1 = width/2;
    var y1 = height/2;
    var x2 = width/2;
    var y2 = height/2;
    var x3 = width
    var y3 = height
    var x4 = width/2;
    var y4 = width/2;
 //white curves
    for (var i = 0; i < 50; i++) {

    //BOTTOM RIGHT//
        stroke('red');
        //bottom right corner (bigger gaps)
        line(x1, height, width, height - y1);

        stroke(67, 21, 32);
        //bottom right corner (smaller gaps)
        line(x2, height, width, height - y2);

    //TOP LEFT//
        stroke('red');
        //top left corner (bigger gaps)
        line(width - x1, 0, 0, y1);

      	stroke(67, 21, 32);
        //top left corner (smaller gaps)
        line(width - x2, 0, 0, y2);



    //MIDDLE "SPOTLIGHT"
    	stroke(255);
    	line(x3, 0, x, y2);

    //TOP RIGHT CORNER//
       	//top right corner (smaller gaps)
    	stroke('red');
    	line(x4, 0, width, y4);

    	stroke(67, 21, 32);
		//top right corner (bigger gaps)
    	line(x2, 0, width, y2);

        x1 = x1*1.08;
        y1 = y1*1.08;
        x2 = x2*1.025;
        y2 = y2*1.025;
    	x4 = x4*1.08;
        y4 = y4*1.08;
    }
}

Leave a Reply