Project – 3 Dynamic Drawing

This particular drawing was inspired by the Purist Paintings of Le Corbusier. The interactive painting re-interprets the ideas of transparency and multi-perspectival drawings explored in Cubist and purist paintings.

sketch
//tjchen 
// 15104 section A
var dia =5
var size = 5
var x
var y 
var vertex1 

function setup() {
    createCanvas(1000, 600);
    background(255);
}
function draw () {
    background(0);
    y = height/2;
    x = max(mouseX,width/5);
    vertex1 = max (0+mouseY*4, width/2);
    vertex2 = min (width-mouseY*4, width/2);
    push();
    var yguitar = height /3;
    rectMode(CORNER);
    fill(61, 80, 130);
    beginShape();
    vertex(vertex1,y);
    vertex(vertex2,y);
    vertex(0,height);
    vertex(width,height);
    endShape();

    //moving bottles
    push();
    scale(mouseY/400);
    rectMode(CENTER);
    fill(230,150);
    rect(mouseX+100,y,60,200,30);
    rect(mouseX+100,y-100,20,100,10);
    strokeWeight(1);
    stroke(0);
    circle(mouseX+100,y-150,20);
    fill(255,0,0,70);
    noStroke();
    rect(mouseX+100,y+15,60,170,30);
    stroke(255,0,0,140);
    pop();
   
    //GUITRAR
    noStroke();
    translate(width/2,height/2);
    scale(mouseY/200); 
    fill(140,height-mouseY);
    rectMode(CENTER);
    rect(200,0,150,50);
    rect(0,0,400,200,80);
    fill(mouseX);
    circle(0,0,50);
    fill(61, 80, 130);
    circle(0,(0)+100,80);
    fill(0);
    circle(0,(0)-100,80);
    //can
    pop();
    push();
    scale(1/(mouseX/400));
    fill(230);
    rectMode(CORNER);
    rect(x-25,y-15,50,150,25);
    strokeWeight(1);
    stroke(0);
    circle(x, y, 50);
    fill(150);
    circle(x, y, 30);
    pop();
    // circle 
    fill(41,71,82);
    circle(3*(width/5),mouseX,50);
    //bull nose
    var c =color(178,13,29,(height-mouseY)); 
    strokeWeight(height-mouseY);
    fill(c);
    rectMode(CENTER);
    rect((width/2)+50,height/2, abs(mouseY/4), mouseY/5,abs(mouseY/5));

}


Leave a Reply