## Concept explanation A **spiral galaxy** can be understood first as a large, rotating **disk** made of stars and gas moving around a bright, dense **central bulge**. In this simplified top-down view, each star follows a nearly circular orbit around the center, so the whole galaxy shows **ordered rotation** rather than random motion. This basic pattern is the foundation to understand before adding the more complex spiral arms seen in real galaxies. ## What you see You are looking down on a galaxy from above. The glowing middle region represents the dense central bulge, while the surrounding faint circles mark different orbital distances from the center. Colored dots sit on those rings and move together as the galaxy rotates, helping you notice that the stars stay on circular paths even when the overall rotation speeds up or slows down. ## Try it yourself - **Drag the rotation speed slider** to the right and watch every ring orbit faster together. - **Move the slider back toward `0.00×`** and notice how the motion slows while the dots still remain on the same circular tracks. - **Press Pause** to freeze the galaxy and inspect how the stars are arranged at one moment in time. - **Press Resume** and then **change the speed again** to compare slow and fast ordered rotation. - **Focus on one dot on an outer ring and one on an inner ring** and notice that both continue circling the same center rather than flying outward. ## Concept explanation In a galaxy, **differential rotation** means that different distances from the center orbit at different **angular speeds**. The inner regions sweep around faster, so over the same amount of time they move through a larger fraction of a full circle than the outer regions. That difference makes an initially straight radial pattern shear over time, which is one of the key ingredients behind how spiral structure can emerge and persist. ## What you see You’re looking at several colored rings of stars orbiting a shared galactic core. Each ring has its own speed label, and the faint vertical line marks the common starting direction. As time increases, the teal connecting line bends because the inner rings race ahead while the outer rings lag behind. You can also highlight one ring to compare its motion against the rest. ## Try it yourself - **Drag the time slider** slowly and watch how the inner blue rings advance farther around the center than the outer red ring. - **Push the time slider farther right** and notice how a straight starting alignment becomes a bent, spiral-like shape. - **Use the highlight ring slider** to focus on one radius and compare its orbit amount with the other rings. - **Drag near the highlighted ring on the canvas** to scrub time by hand and see the same differential motion through direct manipulation. - **Press `Reset time`** and replay the motion from the shared starting line. ## Concept explanation A galaxy’s **differential rotation** means stars at different distances from the center orbit at different angular speeds. If a spiral arm were a **material arm** made of the same stars staying together permanently, then inner stars would swing ahead while outer stars lagged behind. That would stretch any initially straight or open feature into a tighter and tighter spiral, so long-lived spiral arms cannot simply be rigid structures built from one fixed set of stars. ## What you see You are looking down on a galaxy disk filled with faint background stars. The red highlighted stars begin in a single radial line, representing a hypothetical “material arm” made from the same stars. As time increases, that line twists because the inner red stars orbit faster than the outer ones. The colored circular guides track a few sample radii so you can compare how orbit speed changes across the disk. ## Try it yourself - **Press Play** and watch the straight red line quickly wind into a spiral. - **Drag the time slider** back and forth to scrub through the winding process at your own pace. - **Adjust the playback speed slider** to make the winding happen more slowly or more dramatically. - **Drag the red line** to choose a different starting angle, then see that the same winding still happens. - **Press Reset** and compare the open starting line with the tightly wrapped shape that forms later. ## Concept explanation In many spiral galaxies the bright **spiral arms** are not fixed bundles of the same stars traveling together. They behave like long-lived **density waves**: regions where stars crowd together for a while, like a traffic jam that creeps along a highway while individual cars keep entering and leaving it. Each star follows its own orbit around the galactic center, drifts *into* an arm, lingers in the denser region, then drifts back out, while the arm pattern stays put. The reason the crowding happens: stars travel on slightly **elliptical orbits**, and each larger orbit's long axis is **tilted a bit more** than the one inside it. Where these nested, progressively-tilted ellipses bunch up, real density piles on, and that pile-up *is* the spiral arm. Set the eccentricity to zero and the orbits become circles, the tilt no longer matters, and the arms vanish completely. ## The physics under the hood The simulation is not a painted decal. It is computed from the same quantities a galactic-dynamics paper would use: - **Rotation curve** `v(R) = R / √(R² + Rc²)` — rises linearly in the core and flattens at large radius, the shape dark matter produces. - **Angular speed** `Ω(R) = v/R = 1 / √(R² + Rc²)`. - **Epicyclic frequency** `κ(R) = √(2R² + 4Rc²) / (R² + Rc²)`, derived from `κ² = 4Ω² + R d(Ω²)/dR`. This gives `κ/Ω = 2` at the center (solid-body rotation) and `κ/Ω = √2` in the flat region — the correct limits. - **m = 2 closed orbits** are centered ellipses whose long-axis orientation follows a **logarithmic spiral** (constant pitch angle `i`), the shape real galaxy arms approximate. - **Lindblad resonances**, solved live from `Ω`, `κ`, and the pattern speed `Ωp`: - Corotation (CR): `Ω = Ωp` - Inner Lindblad resonance (ILR): `Ω − κ/2 = Ωp` - Outer Lindblad resonance (OLR): `Ω + κ/2 = Ωp` A self-sustaining (Lin-Shu) density wave lives between the ILR and corotation. The on-disk dashed rings mark these radii; the floating frequency graph plots `Ω`, `Ω−κ/2`, `Ω+κ/2` versus radius with the `Ωp` line, so the crossings *are* the resonances. ## Two competing pictures (the Mode button) - **Density wave** (default): every orbit precesses at one shared pattern speed `Ωp`, so the spiral is a rigidly rotating standing pattern. Stars orbit at their own `Ω(R)` and stream *through* the slow pattern — the traffic jam. - **Material arms**: each orbit precesses at its own local `Ω(R)`, so the arm is made of fixed stars. Because inner stars orbit faster than outer ones, the spiral winds up tighter and tighter and smears out within a few rotations. This is the **winding problem** — the reason density-wave theory had to be invented. ## What you see A rotating galactic disk of orbiting stars, with the faint nested ellipses behind them showing the tilted closed orbits. The two arms emerge wherever the orbits crowd, so the bright regions genuinely hold more stars. Dashed rings mark the ILR, corotation (CR), and OLR. A few highlighted tracer stars leave colored paths so you can watch them cross into and out of an arm that stays put. The floating **Show graph** pill (bottom-left) reveals the frequency-vs-radius diagram. ## Controls | Control | Effect | |---|---| | **Pattern speed Ωp** (slider) | Sets how fast the spiral pattern rotates. Moves the resonance rings: slower pushes corotation outward, faster pulls it in. | | **Arm strength (eccentricity)** (slider) | Orbit ellipticity. Higher = tighter, sharper arms. **At 0 the arms disappear** — proof the spiral comes from the orbit tilt. | | **Star count** (slider) | Number of stars (100–3000). More stars sharpen the arm/inter-arm density contrast. | | **Reset stars** (button) | Randomize stellar positions and confirm the same pattern reappears. | | **Toggle traces** (button) | Show/hide the tracer path lines. | | **Mode: density wave / material arms** (button) | Switch between the rigid standing wave and the winding material arms. | | **Show / Hide graph** (floating pill) | Reveal or hide the frequency-curve diagram. | | **Click near a star** | Retag a new set of tracer stars and follow them relative to the arm. | ## Try it yourself - **Drag the pattern-speed (Ωp) slider** and watch the resonance rings and the graph's crossings slide in and out. - **Drag the arm-strength slider** for sharper arms; set it to **0** and watch the spiral vanish. - **Drag the star-count slider** and see the arm density contrast strengthen or fade. - **Press the Mode button** to compare a rigid density wave against material arms winding themselves into oblivion. - **Toggle traces** and **click near any star** to follow individual tracers through the arm. - **Tap the floating Show graph pill** to bring up the Lindblad resonance diagram. ## Concept explanation A galaxy’s **spiral arms** are not fixed piles of gas and stars moving together like solid objects. Instead, they act more like a **density wave**: as orbiting gas clouds enter the wave pattern, they get squeezed into a smaller region. That **compression** raises the local density, so the gas becomes more crowded and can later help trigger star formation. In this view, the clouds keep orbiting, but they bunch up and brighten while passing through the spiral arm. ## What you see You’re looking at a dark galactic disk with glowing spiral arms highlighted in teal. The soft blue blobs are gas clouds orbiting around the center. When a cloud crosses an arm, it becomes flatter, brighter, and slightly more crowded toward neighboring clouds, showing the increase in density inside the wave. If you hover over a blob, its local density value appears so you can compare clouds inside and outside the arms. ## Try it yourself - **Drag the compression strength slider** and watch how strongly the blobs squash and crowd together inside the spiral arms. - **Hover over clouds in and out of the teal arms** to compare the local density readout. - **Switch the spiral arm count** between `2` and `3` to see how the same orbiting gas responds to a different wave pattern. - **Set compression low, then high** and notice that the clouds still orbit, but the densest clumping happens specifically where they enter the highlighted arms. - **Press `Reset clouds`** to randomize the cloud positions and test the pattern again from a new starting arrangement. ## Concept explanation A spiral galaxy’s arms are not fixed collections of the same stars. Instead, they act like **density waves**: regions where orbiting gas gets temporarily crowded and compressed. When cold gas clouds enter one of these denser regions, the extra compression can trigger **star formation**, producing short-lived, **young stars** that shine blue-white. That is why spiral arms look bright and prominent even though individual stars and clouds keep moving through them. ## What you see You are looking at gas clouds orbiting around a galactic center while the spiral-arm pattern drifts more slowly, so the clouds pass into and out of the arms. Gray clouds represent gas, and glowing blue-white dots represent newly formed star clusters. Because the young clusters appear inside the arms and just downstream of them, the arm pattern becomes visually highlighted even though the material itself does not stay locked in place. ## Try it yourself - **Press Play/Pause** to freeze the motion and then resume it so you can compare the moving clouds with the slower-moving arm pattern. - **Lower the star-formation threshold** and watch more gas clouds turn into bright young clusters as they cross dense arm regions. - **Raise the threshold** to make star formation harder, then notice how the arms lose some of their bright blue-white tracing. - **Press Reset** to restart the galaxy and test a different threshold setting from the beginning. - **Watch a single arm region** and notice that gray clouds continue onward, while the brightest young clusters appear a little downstream after compression triggers their formation. ## Concept explanation A **spiral galaxy** does not always keep its arms equally strong on its own. A central **bar** can organize the inner stars and gas so their orbits line up into clearer spiral patterns, while a nearby companion creates a **gravitational disturbance** that tugs on the disk and amplifies wave-like structure. In both cases, the disk responds collectively: stars and gas crowd into preferred lanes, making the spiral arms look brighter, longer, and easier to trace. ## What you see You are looking at a face-on disk galaxy in the main viewing area, with a smaller companion galaxy orbiting nearby. The purple bar appears across the center when the bar option is on, and the red companion can be moved along its path to change how strongly it pulls on the disk. As either influence grows, the galaxy’s star field gathers into more distinct two-armed spirals, and the response meter shows how strongly the disk is being driven. ## Try it yourself - **Turn the central bar off and on** to compare a more diffuse disk with a more organized spiral pattern. - **Move the disturbance strength slider upward** and watch the outer spiral arms extend farther from the center. - **Drag the companion galaxy closer to the main disk** to increase the tidal pull and make the arms stand out more clearly. - **Place the companion farther away** and notice how the spiral pattern softens when the gravitational disturbance weakens. - **Use the bar together with a strong companion disturbance** to see how internal structure and external interactions can reinforce one another. - **Press `Reset path`** to return the companion to its starting orbit and repeat the comparison from the same baseline.