Coding galaxy gen astrophysics

From coilyco-flight-deck/galaxy-gen · View interactive version

Coding galaxy gen astrophysics is an AI agent skill from the GitHub repository coilyco-flight-deck/galaxy-gen. Galaxy-scale astrophysics for the procedural galaxy sim. Morphology, mass distribution, rotation curves, star formation, stellar populations, AGN, mergers. Triggers - galaxy generation, galaxy morphology, spiral arms, elliptical, rotation curve, dark matter halo, IMF, HR diagram, star formation, AGN

How to use this skill

Skill file

Astrophysics for galaxy-gen

Repo: galaxy-gen. Stack: Rust compiled to WASM, rendered in the browser via JS/TS. Sister skill: CODE0 covers the cosmological-scale physics.

This skill encodes the galaxy-scale astrophysics that should shape design decisions. It is not a survey of the field. It is the subset that maps onto procedural-sim choices: what to sample, what to ignore, what gets a closed-form approximation vs. a particle simulation.

What to sample, what to fake

A procedural galaxy sim is sampling from physically motivated distributions. The fidelity question is which distributions are load-bearing for the visual and which can be hand-waved. Order of importance for a browser-rendered sim:

Morphology and the Hubble sequence

Hubble's tuning-fork classification still does the work for procedural pickers. Sample the class up front, then condition everything else on it.

The Hubble fractions vary by environment but a reasonable global mix is roughly 70% spirals (with bars), 25% ellipticals, 5% irregulars in the local universe. Higher elliptical fraction in clusters.

Stellar mass profiles

These are the closed-form profiles you sample from for stellar positions. Both are cheap, both have analytic inverses for rejection sampling.

Rotation curves

The "flat rotation curve" is the most famous galaxy-scale physics result and the cleanest dark-matter signature. If the sim shows orbits, it should show flat curves.

Stellar populations

Per-particle color and luminosity. Visual fidelity lives here.

Star formation, AGN, mergers

Common design pitfalls in procedural galaxy sims

These are the ones that produce galaxies that look wrong to anyone who has seen real images.

Numerical hooks for Rust/WASM

Concept reference

Verbatim Wikipedia lead paragraphs (CC BY-SA 4.0) for every concept above live in CODE0. Reach there when a term needs a precise definition before deciding how to model it.

Sources

Synthesized from public skills, originals are richer if a topic needs depth:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.