An interactive galaxy made with Processing
First pass, drawing blinking pixels on a canvas with gradient
It'd be cool if the size and brightness of stars vary by their distance from the center
Use A and D to control the rotation
Stars leave tracks as if it's time-lapsed
Click to add/remove stars
...something's off? Whenever I click after applying rotation, the stars spawn at the wrong location
Fixing it by adding relative rotation offset to the mouse location
I also noticed that the gradient is cut into several pieces, which I suppose is caused by multiple overlays of images with alpha...
Adding a random offset to the alpha solves the issue
I also added this dragging function to scatter the stars around when dragging
Add a random color to the star class
Meteorites! Generate from the edge of the screen
And blackholes! Here's a start animation for it
...with 4 spiral arms, which hint its radius t attract stars!
and I wish something would happen once they meet each other!
and I wish something would happen once they meet each other!