Move the mouse to change the view angle. WASD moves the star at the center. Press 1, 2, 3, or 4 to set the number of spirals. Press r to toggle between spiral and circular orbits Turbo mode (shift-click flag) makes generation quicker. Inspired by the real-life galaxy NGC 5861, I used some fun math principles (listed below) to scatter the stars according to the "intermediate spiral" galaxy classification. I find this galaxy classification particularly beautiful because the stars move in spirals that are separated from one another. Tilt the camera up and you'll be able to see the two spirals (one redder and one yellower) that have distinct space between them!
♫ Music Credit: Across Space & Time, Carlos Vargas ♫ I used this project as an opportunity to explore the following coding/math principles: - Polar coordinates - Standard Distribution (using Box-Muller transform) - Layering vector shapes with alpha gradients The wasd movement is reused from my pre-existing physics engine: https://scratch.mit.edu/projects/640894098/