/*Interactive Medua Drawing: Michael McAllister
Space elevator.
Move the mouse around the screen to move the elevator.
*/
//window size 400,400 pixels
void setup() {
size(400, 400);
noSmooth();
}
void draw(){
background(11, 13, 32);
//STARS//
fill(250, 250, 250, 0+mouseY);
noStroke();
rect(100, 40+mouseY/10, 10, 10);
fill(250, 250, 250, 0+mouseY);
noStroke();
rect(350, 40+mouseY/10, 10, 10);
fill(250, 250, 250, 0+mouseY);
noStroke();
rect(40, 150+mouseY/10, 10, 10);
fill(250, 250, 250, 0+mouseY);
noStroke();
rect(250, 160+mouseY/10, 10, 10);
fill(250, 250, 250, 0+mouseY);
noStroke();
rect(340, 220+mouseY/10, 10, 10);
fill(250, 250, 250, 0+mouseY);
noStroke();
rect(0, 250+mouseY/10, 10, 10);
fill(250, 250, 250, 0+mouseY);
noStroke();
rect(120, 260+mouseY/10, 10, 10);
fill(250, 250, 250, 0+mouseY);
noStroke();
rect(380, 300+mouseY/10, 10, 10);
fill(250, 250, 250, 0+mouseY);
noStroke();
rect(180, 330+mouseY/10, 10, 10);
//PLANET//
//Surface
fill(40, 40, 70, 200-mouseY);
ellipse(200, 600+mouseY/4, 800, 700);
fill(110, 110, 170);
ellipse(200, 600+mouseY/4, 700, 600);
//Clouds
fill(215, 215, 230);
noStroke();
ellipse(100, 340+mouseY/4, 100, 20);
fill(215, 215, 230);
noStroke();
ellipse(300, 350+mouseY/4, 100, 20);
fill(215, 215, 230);
noStroke();
ellipse(250, 360+mouseY/4, 100, 20);
//SPACE OBJECTS//
//Shuttle
fill(200, 200, 200);
ellipse(65, 195+mouseY/2, 10, 10);
fill(200, 200, 200);
rect(65, 190+mouseY/2, 40, 10);
fill(200, 200, 200);
rect(75, 185+mouseY/2, 30, 5);
fill(80, 80, 80);
triangle(65, 190+mouseY/2, 75, 185+mouseY/2, 75, 190+mouseY/2);
fill(80, 80, 80);
triangle(100, 185+mouseY/2, 110, 175+mouseY/2, 110, 185+mouseY/2);
fill(80, 80, 80);
triangle(120, 175+mouseY/2, 110, 175+mouseY/2, 110, 185+mouseY/2);
fill(200, 200, 200);
triangle(100, 185+mouseY/2, 100, 200+mouseY/2, 110, 185+mouseY/2);
fill(80, 80, 80);
rect(75, 195+mouseY/2, 30, 5);
//Satellite
fill(200, 200, 200);
ellipse(340, 140+mouseY/2, 10, 10);
fill(80, 80, 80);
rect(320, 135+mouseY/2, 15, 12.5);
fill(80, 80, 80);
rect(346, 135+mouseY/2, 15, 12.5);
fill(200, 200, 200);
rect(320, 140+mouseY/2, 20, 2.5);
fill(200, 200, 200);
rect(341, 140+mouseY/2, 20, 2.5);
//ELEVATOR//
//Middle Shaft
fill(80, 80, 80);
rect(190, 0, 20, 400);
fill(200, 200, 200);
rect(195, 0, 10, 400);
//Cabin
fill(80, 80, 80);
rect(140, 380-mouseY, 120, 40);
fill(250, 250, 130);
rect(150, 390-mouseY, 100, 10);
fill(80, 80, 80);
triangle(170, 380-mouseY, 200, 360-mouseY, 230, 380-mouseY);
fill(80, 80, 80);
triangle(170, 420-mouseY, 200, 440-mouseY, 230, 420-mouseY);
//Outer Shaft
fill(200, 200, 200);
rect(160, 0, 10, 400);
fill(200, 200, 200);
rect(230, 0, 10, 400);
//Railings
fill(150, 150, 150);
rect(160, 390+mouseY, 80, 10);
fill(150, 150, 150);
rect(160, 290+mouseY, 80, 10);
fill(150, 150, 150);
rect(160, 190+mouseY, 80, 10);
fill(150, 150, 150);
rect(160, 90+mouseY, 80, 10);
fill(150, 150, 150);
rect(160, -10+mouseY, 80, 10);
fill(150, 150, 150);
rect(160, -110+mouseY, 80, 10);
fill(150, 150, 150);
rect(160, -210+mouseY, 80, 10);
fill(150, 150, 150);
rect(160, -310+mouseY, 80, 10);
}