Project 04: String Art

sketchDownload
//fcooper felix cooper d

var s1=100;
var s2=0;
var s3=150;
var s4=50;

var numLines=50;

var f1=100;
var f2=0;
var f3=50;
var f4=50;

var h1=100;

var c1=50;
var c2=100;
var c3=150;
var c4=100;


function setup() {
    createCanvas(200, 200);
    background(220);

}

function draw() {
    for(var i = 0; i < numLines; i += 1){
        line(s1,s2,s3,s4);
        s1=s1+5;
        s4=s4+3;
    }
    for(var i = 0; i < numLines;i += 1){ //mirrors s
        line(f1,f2,f3,f4);
        f1=f1-5;
        f4=f4+3
    }
    for(var i = 0; i < numLines; i += 1){ //lines down the middle
        line(50,h1,150,h1);
        h1+=3;
    }
    for(var i = 0; i <= 5; i += 1){ // draws hourglass
        line(c1,c2,c3,c4);
        c1+=2;
        c2+=2;
        c3-=2;
        c4+=2;
    }
}

I wanted to try to make some sort of perspective illusion but I think it ended up being an illusion of an illusion in a way. It makes you think maybe something weird is going on but its just fun shapes.

Leave a Reply