PulseCore

Chapter 6 · Section 5

How Big a Galaxy Is, and How Big It Is Drawn

The BPT law

BPT Part 3.12 and Part 3.14 state the Disk Size law, R⊘ = λ⟲ · R⊡ / √2: "A disk is as wide as its halo's spin allows", R⊘ the scale length of the disk, λ⟲ the halo's spin parameter, R⊡ the radius of the halo it settles in. "With λ⟲ ≈ 0.035 a disk is a few hundredths of its halo across, which is why disks are thin and small inside their great dark halos." Part 3.12 gives the reason: gas in a spinning clump "radiates its heat but keeps its angular momentum, turns faster as it contracts (Ω · R² kept), and settles in a disk R⊘ = λ⟲ R⊡ / √2, about R⊡/40 for λ⟲ ≈ 0.035. The disk is not drawn to scale." The spin parameter itself is the Halo Spin Parameter of Part 3.14, λ⟲ = J⟲ · E⊖^(1/2) / (G · M^(5/2)), "spread about 0.035 (Peebles, 1969; Bullock et al., 2001)." And Part 3.14 (How the Type Is Read) says how the game draws it: "a disk drawn at its true size would be a speck on that field, so each galaxy is drawn enlarged, nearly halfway to its nearest neighbour, its arms, its turning and its well at the heart of it in view."

The established physics

  • Disk scale length from conserved angular momentum, R_d = λ·R_h/√2 (Mo, Mao & White 1998, The formation of galactic discs).
  • Halo spin parameter spread about λ ≈ 0.035 (Bullock et al. 2001, A universal angular momentum profile for galactic halos).
  • An exponential disk holds 1 − (1 + x)·e^(−x) of its light within x scale lengths: at x = 4, 1 − 5e⁻⁴ = 0.908, the "nine tenths" the code cites.

The enlargement toward the nearest neighbor is a game method; no physics source applies to it.

The game's math

The true size (galaxyOf() app.js:3034–3035):

r_h   = radius holding 0.9 of the members' mass (R if never reached)
R_d,draw = max(0.05, 0.035 · r_h / √2)                  cells
R_draw   = max(DRAW_MIN, 4 · R_d,draw),  DRAW_MIN = 0.5  cells
hideR    = max(2, min(R, 4 · R_d))                      (R_d the measured one of Part 6.4)

Example: a halo with r_h = 8 cells gives R_d,draw = 0.035 × 8 / 1.414 = 0.198 cells and R_draw = 0.79 cells: under one cell, on a 256-cell field. The comment at app.js:3029–3033 (2026-10-28) records that galaxies were drawn to their whole reach before, 8 to 16 cells, "ten to twenty times too big".

hideR is passed to the scene but no scene code reads it: the scene hides a body's own star points inside the galaxy's drawn radius instead (inGalaxy() scene3d.js:690, Part 6.8).

The enlargement (updateGalaxies() app.js:3116–3117). With n galaxies on the list and nn the periodic distance from a galaxy to its nearest other galaxy:

R_max = 0.45 · √(rows·cols / max(1, n))                 0.45 of the mean spacing between galaxies
R₂  = max(R_draw, min(R_max, 0.45 · nn))                (0.45 · 3·R_max if it has no neighbor)
k   = R₂ / R_draw;   R_draw ← R₂;   R_d,draw ← k · R_d,draw

So the drawn ratio R_draw / R_d,draw stays 4 (or more where DRAW_MIN applied), and the galaxy is drawn nearly halfway to its nearest neighbor, at most 0.45 of the field's mean spacing and never smaller than its true size.

Example: a desktop field, 256 × 256, with 100 galaxies: mean spacing √(65,536/100) = 25.6 cells, R_max = 11.5 cells. The galaxy above, with a neighbor 14 cells away, is drawn at min(11.5, 6.3) = 6.3 cells, an enlargement of 6.3 / 0.79 = 8.0. A lone galaxy (nn = ∞) is drawn at R_max.

In the game

What the player sees is the book's "drawn enlarged, nearly halfway to its nearest neighbour". Galaxies fill the torus side by side, each reaching about halfway to the next, so a crowded region shows many small galaxies and a lonely one a single wide one. The comment at app.js:3113–3115 (2026-10-29) records why: at its true size "a galaxy was about 5 px across at the default view, 300 stars in a dot". As galaxies merge or new ones light, the spacing changes and every galaxy is resized at the next reading.

The Zoom slider ("In 3D, how close the camera is", index.php:212) changes what the size shows. A galaxy's points scale with its drawn radius, size × clamp(R/8, 0.12, 1) (scene3d.js:533): "from afar a galaxy is a glow, near its stars (the shader keeps each at least 2.5 px)". In a deep universe every point is larger and brighter by standLight() (scene3d.js:684–688), 0.15 in size and 0.1 in brightness for each decade of stars a drawn star stands for, so at level 28 the stars are "nearly single, sharp points" and deeper "each is a cloud's or a galaxy's light".

The scale model

The true size is the law's, R_d = λ·r_h/√2, read from the drawn halo. The drawn size is set by the spacing of the galaxies, k = R₂ / R_true, typically several to twenty times the law. What one drawn galaxy stands for is one real galaxy, with its shape (R/R_d = 4, the arms, the pitch) kept and its size scaled up by k.

Where the game and the theory differ

  • BPT draws each galaxy "nearly halfway to its nearest neighbour". The game does that (0.45 of the distance) and adds a top of 0.45 of the field's mean spacing between galaxies, which BPT does not state; it decides the size of a lone galaxy and of any galaxy whose neighbor is far.
  • The true size has floors the law does not have: a drawn scale length of at least 0.05 cells and a drawn radius of at least DRAW_MIN = 0.5 cells.
  • hideR, with its floor of 2 cells, is computed and passed but no scene code reads it.

Fixed numbers

Number Where What it is Kind
0.9 app.js:3034 halo reach: radius holding nine tenths of members' mass BPT (Part 3.14, Disk Size: "R_h measured as the radius holding nine tenths")
0.035 app.js:3035 spin parameter λ PHYSICS (Bullock et al. 2001)
√2 app.js:3035 R_d = λ·R_h/√2 PHYSICS (Mo, Mao & White 1998)
0.05 app.js:3035 least drawn scale length, cells CAP
4 app.js:3035 drawn to four scale lengths PHYSICS (90.8% of an exponential disk's light)
0.5 app.js:2915 DRAW_MIN: least drawn radius, cells CAP
2 app.js:3035 least hideR, cells (unused by the scene) CAP (dormant)
4 app.js:3035 hideR to four measured scale lengths PHYSICS (as above)
0.45 app.js:3116 cap = 0.45 of the mean spacing between galaxies CAP
0.45 app.js:3117 drawn to 0.45 of the nearest neighbor's distance CAP
3 app.js:3117 a galaxy with no neighbor is treated as 3·cap from one METHOD (lets the cap decide)
1 app.js:3116 max(1, n) METHOD
1e-6 app.js:3117 least size in the ratio k METHOD