I knew I wanted to do something in space as soon as i saw what you can do with shapes in processing. here I have a blue planet, a sun, a black hole, a satellite, some UFOs (one of which can move around) and a lot of stars. something that you cant see is that once you hit play, a star will move across the screen and get sucked right into the black hole, nowhere to be seen again. as I make future edits, i might want to make the satellite move around the planet, have more stars get sucked in, and add a couple more objects or planets.
here is my code if anyone wants to see it for themselves:
int circleX;
void setup() {
size(1000, 800);
circleX = 50;
}
//moving UFO
void draw () {
background(66, 55, 69);
fill(162, 0, 255);
stroke(255);
ellipseMode(CENTER);
ellipse(mouseX, mouseY, 100, 50);
stroke(219, 240, 99);
fill(247, 255, 0);
ellipse(mouseX, mouseY, 50, 30);
fill(255);
ellipse(circleX,180,24,24);
circleX = circleX + 2;
if (mouseX > 100) {
fill(255, 0, 0);
ellipse(200, 100, 50, 50);
}
if (mouseX > 200) {
fill(0, 255, 0);
ellipse(300, 300, 50, 50);
}
//planet
fill(28, 96, 232);
strokeWeight(13);
stroke(19, 146, 214);
ellipse(879,770,600,600);
line(341, 470, 700, 520);
line(1000, 867, 340, 473);
//sun
fill(255, 245, 64);
strokeWeight(7);
stroke(852, 255, 161);
ellipse(34, 35, 155, 155);
//satellite
fill(255, 255, 255);
stroke(230, 223, 223);
rect(146, 184, 50, 50);
fill(0, 204, 255);
strokeWeight(5);
stroke(62, 222, 222);
triangle(95, 320, 50, 270, 140, 240);
triangle(225, 105, 200, 180, 270, 140);
//ufo
fill(162, 0, 255);
ellipse(700, 400, 98, 31);
fill(247, 255, 0);
stroke(219, 240, 99);
ellipse(700, 385, 56, 24);
//black hole
fill(10);
ellipse(990, 170, 100, 100);
// yellow stars
fill(253, 255, 206);
ellipse(200, 700, 5, 5);
ellipse(100, 500, 5, 5);
ellipse(300, 300, 5, 5);
ellipse(600, 100, 5, 5);
ellipse(800, 300, 5, 5);
ellipse(470, 350, 5, 5);
ellipse(300, 100, 5, 5);
ellipse(500, 750, 5, 5);
ellipse(350, 600, 5, 5);
//white stars
fill(255, 255, 255);
ellipse(380, 500, 5, 5);
ellipse(200, 300, 5, 5);
}