Skip to content

Instantly share code, notes, and snippets.

@Chloeolhc
Created November 5, 2019 16:14
Show Gist options
  • Save Chloeolhc/d7147c54b82236c045cf375b2cd9776b to your computer and use it in GitHub Desktop.
Save Chloeolhc/d7147c54b82236c045cf375b2cd9776b to your computer and use it in GitHub Desktop.
Inter Lab Project
void setup() {
size (600, 600);
background (245, 222, 179, 200);
fill (240, 230, 140, 200);
triangle (0, 0, 520, 220, 520, 440);
fill (255, 239, 213, 100);
triangle (0, 0, 520, 440, 520, 520);
noFill();
fill (240, 230, 140, 50);
quad(0, 220, 520, 40, 520, 220, 0, 480);
line(0, 220, 520, 40);
line(520, 220, 0, 480);
line(120, 179, 280, 340);
line (240, 300, 520, 160);
line (230, 140, 440, 260);
fill (173, 216, 230, 150);
quad(230, 140, 440, 260, 520, 220, 285, 120);
noStroke();
fill(255, 215, 0, 150);
quad (240, 300, 520, 160, 520, 220, 280, 340);
fill(250, 128, 114, 200);
quad(280, 280, 311, 264, 357, 303, 320, 320);
stroke(105, 105, 105);
strokeWeight(8);
line (340, 190, 450, 200);
strokeWeight(8);
line (360, 260, 380, 160);
}
float value =0;
void draw() {
noStroke();
ellipse (280, 180, 90, 90);
fill(value, 230, 230, 100);
}
void mouseMoved() {
float d = dist(280, 180, mouseX,mouseY);
if (d < 45){
value = (225);}
else if(d>45){
value =(0);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment