ScratchData LogoScratchData
Back to Cukee8's profile

NGC 5861 - Animated Galaxy

CUCukee8•Created July 25, 2023
NGC 5861 - Animated Galaxy
12
10
64 views
View on Scratch

Instructions

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!

Description

♫ 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/

Project Details

Project ID877373340
CreatedJuly 25, 2023
Last ModifiedJuly 27, 2023
SharedJuly 25, 2023
Visibilityvisible
CommentsAllowed