Danielle Small HW 2.1 part 3

void setup() {
size(400, 400);// window size
background(255);// white background
fill(255, 0, 0);// red color
rect(200, 0, 200, 200);// red rectangle
fill(0, 0, 255);// blue color
rect(0, 200, 200, 200);// blue rectangle
noStroke();// no outline for triangle’s
fill(255, 0, 0);// red color
triangle(100, 30, 50, 150, 150, 150);// red upward triangle
triangle(50, 60, 150, 60, 100, 180);// red downward triangle
fill(0, 0, 255);// blue color
triangle(300, 230, 250, 350, 350, 350);// blue upward triangle
triangle(250, 260, 350, 260, 300, 380);// blue downward triangle
}

void draw(){
}

void mousePressed(){
stroke(0);
fill(175);
rect(mouseX, mouseY, 30, 50);
}

void mouseDragged(){
triangle(pmouseX, pmouseY, mouseX, mouseY, 200, 100);
}

void keyPressed(){
}

 

This entry was posted in Uncategorized. Bookmark the permalink.

One Response to Danielle Small HW 2.1 part 3

  1. Danielle-

    Do you have the first part of the assignment where you were to fix the broken code? Please upload that as well so I can give you full credit.

    – Calli

Leave a Reply

Your email address will not be published. Required fields are marked *