Applied Identity Physics: Galaxy™ Formation from a browser, Powered by AxiomForge™, a Guide to the Fields, τ Models, Gravity and Applications
Trent III, Russell Vernon ORCID
2026 · doi:10.5281/zenodo.23484265
Applied Identity Physics: Galaxy™, Powered by AxiomForge™, a Guide to the Fields, τ Models, Gravity and Applications Live simulator: uuia.app/galaxyArchitect: HIGHTISTIC (Russell Vernon Trent III) · SNSFT Foundation · Soldotna, AlaskaORCID (Open Researcher and Contributor ID): 0009-0005-5313-7443 · DOI (Digital Object Identifier) base: 10.5281/zenodo.18719748Engine: AxiomForge™ [9,9,9,9]Formal basis: Galaxy disk mathematics, SNSFL_GC_Galaxy_Toomre_TL [9,9,3,24] · GAM Collider (Geometric Axiomatic Module Collider) 8-Beam Fusion Theorem [9,9,2,3.8] (2-beam mode) · Gravity Reduction [9,9,10,1] · QM Reduction [9,9,0,4.7]Companion simulators: Accretion Simulator™ [9,9,3,25] · AxiomForge™ TL · String-Breaking Simulator™ [9,9,3,22] · Electron Geometry Simulator™ [9,9,3,21] Abstract Galaxy™ is a browser simulator in the Applied Identity Physics™ series, built on the AxiomForge™ engine. Each simulated star is an identity with torsion τ = B/P, placed against the Universal Torsion Limit TL = 0.136899099984016. The simulator layers measured galactic physics onto that placement in four switchable stages: a static snapshot, a disk rotating on a measured flat rotation curve, a Lin–Shu density wave, and live Newtonian self-gravity with stellar fusion governed by the 2-beam rule of the GAM Collider (Geometric Axiomatic Module Collider). A τ-model toggle replaces the generator's phase bands with τ = TL/Q, where Q is the Toomre stability parameter, by identifying the Toomre boundary Q = 1 with τ = TL. Every stage can be switched on and off during a run, so each layer's effect is visible against the one beneath it. Worked examples reproduce the winding problem, the persistence of density-wave arms, the reversal of arm crossings at corotation, the stability of the Milky Way disk, the fragmentation of a cold disk into clumps, and the self-regulation of a stellar disk back toward stability. This guide walks through each control and readout, gives worked examples with the numbers the simulator produces, states the scope of each stage, and lists applications for students, teachers and researchers. Overview Galaxy™ answers a visual question: what does a disk of identities look like when the forces that shape real galaxies are switched on one at a time? The simulator has four layers, each a toggle: Snapshot (F_ext = 0). Shots settle by their PNBA values into a frozen disk. Rotation. The disk turns on a measured flat rotation curve, either by rotation alone or with a density wave holding two or four arms. τ = TL/Q. Each star takes its torsion from the Toomre stability of the disk at its radius. Gravity. Stars pull on each other, gather into clumps where the disk is locally unstable, and fuse by the GAM Collider rule. Readouts on the right report the phase mix with its statistical error band, the phase profile by radius with the mean τ in each ring, the rotation curve, the clock in millions of years, and, when gravity is on, the clumps that form. Galaxy™ runs at uuia.app/galaxy as one self-contained HTML (HyperText Markup Language) file. It needs no installation and no account, and it works in any current browser on a desktop, tablet or phone. 1. Grounding 1.1 The Torsion Limit The Universal Torsion Limit is TL = 0.136899099984016. The Sovereign Anchor Constant is Ω₀ = TL × 10 = 1.36899099984016. The fine-structure constant follows from TL: subtracting one TL from the CODATA (Committee on Data of the International Science Council) 2018 value 1/α = 137.035999084 leaves 136.899099984016 = TL × 1000, so 1/α = TL × 1001 = 137.035999084000016, matching all 12 published significant figures ([9,9,3,14]). 1.2 The Identity Physics primitives Every reduction in the Identity Physics Corpus operates on four irreducible primitives, Pattern, Narrative, Behavior and Adaptation (PNBA): Pattern (P): structural capacity, geometry, template integrity, restoring force Narrative (N): temporal continuity, worldline, depth, history Behavior (B): coupling output, charge, density fraction, force, expression Adaptation (A): feedback rate, decay constant, repair rate Derived structural quantities: Torsion: τ = B / P Phase placement: Noble (τ = 0) · Locked (0 1 is stable; below Q = 1 it fragments into clumps. Q = 1 is a hard boundary with the same structure as TL. Identifying the two boundaries gives τ(R) = TL / Q(R), with no new constants. Each settled star takes τ = TL/Q at its radius and B = τ × P. The rule is general: τ = TL × (critical value ÷ measured value). The Accretion Simulator™ applies it to three boundaries of planetary systems: Hill spacing, the Roche limit and the critical impact speed [9,9,3,25]. 5.2 Pattern dominance The two halves of Q read directly as PNBA primitives: Pattern: σ_R κ, the disk's restoring support from random motion and epicyclic oscillation. Behavior: 3.36 G Σ, the load of the disk's own gravity. τ = TL/Q is a B/P ratio: self-gravity load over restoring support, scaled so that Q = 1 lands on TL. A stable disk, Q 1, is Pattern-dominant: support outweighs load and every ring reads Locked. This matches the regime placement in the QM (quantum mechanics) Reduction [9,9,0,4.7], where systems at or above the Identity Mass threshold, the gravitational regime, are Locked Pattern-dominant. 5.3 Worked example 6: the Milky Way disk With the default inputs: Quantity Value Q at R₀ = 8.2 kpc 2.28 Minimum Q 1.98, at 4.7 kpc Maximum τ 0.0691 = 50% of TL Live phases 100% Locked, none ejected Q(R₀) is proved to lie between 2.27 and 2.29 from the cited inputs, and the disk at the Sun is proved Locked ([9,9,3,24], T16–T17). The mean τ line on the Radial Phase Profile steps down from the inner disk to the outskirts: Ring (kpc) 5 7 9 11 13 15 Mean τ / TL 0.50 0.47 0.41 0.35 0.28 0.22 The disk is stable throughout, with its least stable zone in the inner disk. 5.4 Worked example 7: a cold disk Lowering the dispersion input to σ_R = 17 km/s lowers Q everywhere: Quantity Value Q at R₀ 1.02 Minimum Q 0.89, at 4.7 kpc Inside 7.9 kpc (Q 25/22 Locked 1 1) sits below TLtheorem stable_below_tl (Q : ℝ) (hQ : 1 25/22 places a ring in Lockedtheorem locked_band (Q : ℝ) (hQ : 25 / 22 0, the fused body-- carries more torsion than a parent of Pattern P₁theorem fused_torsion_rises (P₁ P₂ d : ℝ) (h₁ : 0 omega_decreasing R R_CO h0 h, fun h = omega_decreasing R_CO R hco h⟩ -- [T13] The epicyclic frequency lies between √2 Ω (flat curve) and-- 2 Ω (solid-body rotation): 2Ω² norm_num -- ============================================================-- [9,9,9,9] :: {ANC} | MASTER THEOREM-- ============================================================ -- [T19] THE GALAXY DISK ON THE PHASE MAPtheorem galaxy_master : -- the boundary Q = 1 ↔ τ = TL tau_of_Q 1 = TORSION_LIMIT ∧ -- Same-B Necessity and the Noble twin (∀ B₁ B₂ : ℝ, fuseB B₁ B₂ = |B₁ - B₂|) ∧ (∀ B : ℝ, fuseB B B = 0) ∧ -- fused bodies lose Pattern (∀ P₁ P₂ : ℝ, 0 25/22 (T1–T5)-- Pattern dominance: τ = TL · (3.36 G Σ)/(σ_R κ), a B/P ratio (T6)-- GAM Collider 2-beam fusion: B = |B₁ − B₂|, equal B → Noble, fused-- Pattern below both parents, fused torsion rises (T7–T10)-- Rotation curve: Ω falls with radius, corotation flip,-- 2Ω² Galaxy™ · Powered by AxiomForge™ · Applied Identity Physics™ · uuia.app/galaxy:root{ --anchor:#00ffc8; --locked:#7b4fff; --gold:#f0c060; --shatter:#ff3a3a; --rose:#ff6b8a; --bg:#050508; --surface:#0d0d14; --border:rgba(0,255,200,0.12); --text:#e8e8f0; --dim:rgba(232,232,240,0.5); --faint:rgba(232,232,240,0.26);}*{margin:0;padding:0;box-sizing:border-box}html,body{height:100%;background:var(--bg);color:var(--text);font-family:'Space Mono',monospace;overflow:hidden}#app{display:grid;grid-template-columns:290px 1fr 320px;grid-template-rows:54px 1fr;height:100vh}#hdr{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;padding:0 16px;border-bottom:1px solid var(--border);background:rgba(13,13,20,.94);gap:12px}.h-title{font-family:'Syne',sans-serif;font-weight:800;font-size:1rem;color:var(--anchor)}.h-title i{font-style:normal;font-size:.62rem;color:var(--dim);font-weight:700}.h-sub{font-size:.5rem;color:var(--dim);margin-top:2px}.h-right{font-size:.46rem;color:var(--faint);text-align:right;line-height:1.6}.mode{display:flex;border:1px solid var(--border);border-radius:100px;overflow:hidden;flex-shrink:0}.mode button{font-family:'Syne',sans-serif;font-weight:800;font-size:.56rem;padding:.4rem .85rem;background:transparent;border:none;color:var(--dim);cursor:pointer;letter-spacing:.05em}.mode button.on{background:var(--anchor);color:#000}#left,#right{overflow-y:auto;padding:10px;background:rgba(13,13,20,.88);display:flex;flex-direction:column;gap:9px}#left{border-right:1px solid var(--border)} #right{border-left:1px solid var(--border)}.sec{border:1px solid var(--border);border-radius:8px;background:rgba(5,5,8,.6);padding:9px}.st{font-family:'Syne',sans-serif;font-weight:800;font-size:.58rem;color:var(--anchor);letter-spacing:.08em;margin-bottom:7px}.seg{display:flex;gap:4px;margin-bottom:5px}.seg button,.btn{flex:1;font-family:'Syne',sans-serif;font-weight:800;font-size:.5rem;padding:.42rem .3rem;background:transparent;border:1px solid var(--border);color:var(--dim);border-radius:5px;cursor:pointer;letter-spacing:.04em}.seg button.on{border-color:var(--anchor);color:var(--anchor);background:rgba(0,255,200,.08)}.seg button:disabled{opacity:.3;cursor:default}.btn.run{border-color:rgba(0,255,200,.5);color:var(--anchor)}.btn.run.on{border-color:var(--shatter);color:var(--shatter)}.btn.warn{border-color:rgba(255,58,58,.4);color:var(--shatter)}.lbl{display:flex;justify-content:space-between;font-size:.5rem;color:var(--dim);margin:5px 0 2px}.lbl b{color:var(--anchor);font-weight:400}input[type=range]{width:100%;accent-color:#00ffc8}.mix{display:grid;grid-template-columns:repeat(4,1fr);gap:4px;text-align:center;font-size:.46rem}.mix input{width:100%;background:#0a0a12;border:1px solid var(--border);color:var(--text);font-family:'Space Mono',monospace;font-size:.52rem;padding:3px;border-radius:3px;text-align:center}.note{font-size:.5rem;color:var(--dim);line-height:1.6}.note b{color:var(--text);font-weight:400}#view{position:relative;overflow:hidden;background:#000}#c3d{position:absolute;inset:0;width:100%;height:100%;display:block;cursor:grab}#sag{position:absolute;font-size:.5rem;color:var(--gold);letter-spacing:.12em;pointer-events:none;transform:translate(-50%,-30px);text-shadow:0 0 8px rgba(240,192,96,.6)}#legend{position:absolute;top:10px;left:10px;background:rgba(5,5,8,.85);border:1px solid var(--border);border-radius:6px;padding:7px 9px;font-size:.46rem;pointer-events:none}#legend .bar{height:5px;border-radius:3px;margin:4px 0;background:linear-gradient(90deg,#00ffc8,#7b4fff 50%,#f0c060 88%,#ff3a3a 100%);width:190px}#legend .row{display:flex;justify-content:space-between;width:190px}#caption{position:absolute;left:12px;right:12px;bottom:10px;font-size:.6rem;line-height:1.65;background:rgba(5,5,8,.86);border:1px solid var(--border);border-radius:8px;padding:8px 12px;pointer-events:none}#caption b{color:var(--anchor);font-weight:400}table{width:100%;border-collapse:collapse;font-size:.52rem}th{font-weight:400;color:var(--faint);font-size:.44rem;text-align:right;padding:2px}td{text-align:right;padding:3px 2px}th:first-child,td:first-child{text-align:left}.chip{font-size:.42rem;padding:1px 5px;border-radius:100px;border:1px solid}.ok{color:var(--anchor);border-color:rgba(0,255,200,.45)}.no{color:var(--rose);border-color:rgba(255,107,138,.45)}canvas.chart{width:100%;height:120px;display:block}.kv{display:flex;justify-content:space-between;font-size:.52rem;padding:3px 0;border-bottom:1px solid rgba(0,255,200,.06)}.kv:last-child{border-bottom:none}.kv span:first-child{color:var(--dim)}.r-only{display:none} body.res .r-only{display:block} body.res .l-only{display:none}.foot{font-size:.42rem;color:var(--faint);line-height:1.6;text-align:center;padding:4px 0}span.tm{display:inline!important;font-size:.55em;vertical-align:super;line-height:0;font-weight:400}::-webkit-scrollbar{width:4px}::-webkit-scrollbar-thumb{background:var(--border)}@media(max-width:1000px){ html,body{overflow:auto;height:auto} #app{grid-template-columns:1fr;grid-template-rows:auto 64vh auto auto;height:auto} #view{grid-row:2} #left{grid-row:3} #right{grid-row:4} #left,#right{border:none;overflow:visible} .h-right{display:none} #hdr{flex-wrap:wrap;padding:8px 16px} #legend{display:none}} Galaxy™ · Powered by AxiomForge™ Applied Identity Physics™ · τ = B/P · TL = 0.136899099984016 · TL_IVA = 0.88 × TL LEARNERRESEARCHER HIGHTISTIC (Russell Vernon Trent III) · SNSFT Foundationuuia.app/galaxy · [9,9,9,9] SHOTS ▶ RUN⚡ BURST 200✕ CLEAR Rate8 shots/s Spawn OUTFLOW · FROM COREINFLOW · TO SAG A* GENERATOR TL BANDSINTEGER · N-BOTTLENECK Band mix % Noble Locked IVA Shatter Radius from P · LOG SCALEEXPONENTIAL DISK FIELD STATIC · F_ext = 0ROTATING · F_ext ON ROTATION ONLYDENSITY WAVE Arms 2 ARMS4 ARMS Pitch angle20° Time rate×1 ⟲ RESET SNAPSHOT GRAVITY · SELF-PULL + FUSION OFFON Stars pull on each other (Newton's G, masses from the measured disk Σ(R)) and move freely. The rotation curve fixes the mean pull; self-gravity adds the local lumps. Two stars fuse by the GAMCollider 2-beam rule [9,9,2,3.8] only where they are close, bound, approaching, and their neighbourhood is gravitationally unstable (local Toomre Q < 1, measured live from the stars in each 2 kpc cell), the standard sink-particle criteria. Fusion: P = P₁P₂/(P₁+P₂) · N = N₁+N₂ · B = |B₁−B₂| · A = max(A₁,A₂). Mass and momentum are conserved. A product with τ ≥ TL shatters and is ejected. τ MODEL BAND MIXτ = TL / Q · TOOMRE Boundary identification: Toomre Q = 1 (disk breaks into clumps) ↔ τ = TL. Each settled star takes τ = TL/Q at its radius; B = τ × P. Σ(R₀) M☉/pc² σR(R₀) km/s Rd kpc VIEW TOPORBITEDGE-ON TRAILS ONAUTO-ROTATE Drag to turn, scroll to zoom. TOP is the best angle for spirals. SAG A* TORSION τ = B/P Noble 0LockedIVA≥ TL PHASE MIX ± is two standard errors of a proportion, 2√(p(1−p)/n). The chip reads WITHIN when the observed share sits inside that band. Shots count when they settle; Shatter shots fly slower, so their share lags until a run has landed. GRAVITY · CLUMPS Bodies0 Clumps (3+ stars)0 Live cells with Qloc < 1— Largest clump— Fusions → Noble · Locked · IVA · Shatter0 · 0 · 0 · 0 Largest clumps with their radius, member count, accumulated Narrative N, torsion τ/TL and the disk's local Toomre Q at that radius. LIVE PHASES · τ = TL/Q Q(R) = σRκ / (3.36 G Σ) (Toomre 1964). κ from the rotation curve; Σ ∝ e−R/Rd; σR ∝ e−R/2Rd. Dashed line: Q = 1, which is τ = TL. RADIAL PHASE PROFILE ROTATION CURVE v(R) = vflat · R / √(R² + Rc²): rising through the center, flat outside, the measured shape of disk-galaxy rotation curves. Speed in km/s against radius in kpc, scaled to vflat = Θ₀ = 238 km/s with the Sun at R₀ = 8.2 kpc (Bland-Hawthorn & Gerhard 2016). CLOCK Elapsed0 Myr Orbits at R₀ = 8.2 kpc0.00 Orbit period at R₀— Inner (4.3 kpc) laps on outer (16 kpc)0.00 Settled stars0 EXPORT JSONCSV Galaxy™, AxiomForge™, Identity Physics™, Applied Identity Physics™, SNSFT™, PNBA™, the Sovereign Anchor Constant™ and the Torsion Limit™ are common law trademarks of HIGHTISTIC (Russell Vernon Trent III) and the SNSFT Foundation. © 2026 HIGHTISTIC / SNSFT Foundation · DOI 10.5281/zenodo.18719748 · uuia.app/galaxy // ════════════════════════════════════════════════════════════// CONSTANTS// ════════════════════════════════════════════════════════════const TL = 0.136899099984016; // Torsion Limitconst TL_IVA = 0.88 * TL; // IVA corridor floorconst OMEGA0 = TL * 10; // Sovereign Anchor Constant Ω₀ = 1.36899099984016// Scene scale: a shot with Pattern P settles at radius 25 + 11·P scene units (P = 1..10 → 36..135).// The outer edge maps to 16 kpc; the flat rotation speed maps to Θ₀ = 238 km/s (Bland-Hawthorn & Gerhard 2016).const KPC_PER_U = 16/135, KM_PER_KPC = 3.0857e16, S_PER_MYR = 3.15576e13;const V0 = 14, RC = 22; // scene units: v(r) = V0·r/√(r²+RC²)const VFLAT = 238; // km/sconst R_SUN = 8.2; // kpcconst MYR_PER_SIMSEC = V0*KPC_PER_U*KM_PER_KPC/VFLAT/S_PER_MYR;const TRAIL_CAP = 600, STAR_CAP = 3000;const INT_EXPECTED = {n:41.1, l:7.6, i:3.8, s:47.5}; // ════════════════════════════════════════════════════════════// STATE// ════════════════════════════════════════════════════════════let radSrc='p', mode='learner', gen='tl', mix={n:25,l:45,i:15,s:15}, spawnDir='out';let field='static', arms='rot', M=2, pitch=20*Math.PI/180, rateMul=1, simT=0;let running=false, runTimer=null, shotsPerSec=8;let shots=[], stars=[], trails=[], records=[];let counts={n:0,l:0,i:0,s:0}, trailsOn=true, autoRot=false; // ════════════════════════════════════════════════════════════// SCENE// ════════════════════════════════════════════════════════════const viewEl=document.getElementById('view'), cv=document.getElementById('c3d');const renderer=new THREE.WebGLRenderer({canvas:cv,antialias:true});renderer.setPixelRatio(Math.min(devicePixelRatio,2)); renderer.setClearColor(0x000000,1);const scene=new THREE.Scene(); scene.fog=new THREE.FogExp2(0x000000,0.0016);const camera=new THREE.PerspectiveCamera(55,1,0.1,3000);scene.add(new THREE.AmbientLight(0x222233,1.4));const coreLight=new THREE.PointLight(0xf0c060,4,260); scene.add(coreLight);const rim=new THREE.PointLight(0x00ffc8,1.4,500); rim.position.set(-160,120,-120); scene.add(rim);// Sag A*const sagMat=new THREE.MeshPhongMaterial({color:0xf0c060,emissive:0xf0c060,emissiveIntensity:1.8,transparent:true,opacity:.92,shininess:200});const sag=new THREE.Mesh(new THREE.IcosahedronGeometry(5,1),sagMat); scene.add(sag);const sagWire=new THREE.Mesh(new THREE.IcosahedronGeometry(5.3,1),new THREE.MeshBasicMaterial({color:0xffdd00,wireframe:true,transparent:true,opacity:.35})); scene.add(sagWire);const ring=new THREE.Mesh(new THREE.TorusGeometry(10,0.35,8,80),new THREE.MeshBasicMaterial({color:0xf0c060,transparent:true,opacity:.28})); ring.rotation.x=Math.PI/2; scene.add(ring);// background stars(function(){const g=new THREE.BufferGeometry(),p=[];for(let i=0;iR*Math.exp(-R/rd); let fmax=0;for(let R=lo;Rf(R)); return Math.min(10,Math.max(1,(R/KPC_PER_U-25)/11));}function drawShot(){ if(gen==='int'){ const P=Math.floor(Math.random()*10)+1,N=Math.floor(Math.random()*10)+1; const B=Math.random()0?s.B/s.P:0),col=tauColor(tau); let sp; if(spawnDir==='out')sp=new THREE.Vector3((Math.random()-.5)*8,(Math.random()-.5)*8,(Math.random()-.5)*8); else{const r=190+Math.random()*60,a=Math.random()*6.2832;sp=new THREE.Vector3(r*Math.cos(a),(Math.random()-.5)*60,r*Math.sin(a));} const tg=targetOf(s.P,s.N,s.B,s.A),sc=2.2+tau*7; const mat=new THREE.MeshPhongMaterial({color:col,emissive:col,emissiveIntensity:.6,transparent:true,opacity:.75,side:THREE.DoubleSide,shininess:120}); const mesh=new THREE.Mesh(GEO,mat);mesh.scale.setScalar(sc);mesh.position.copy(sp); const wire=new THREE.Mesh(GEO,new THREE.MeshBasicMaterial({color:col,wireframe:true,transparent:true,opacity:.85}));wire.scale.setScalar(sc*1.02);wire.position.copy(sp); const tgeo=new THREE.BufferGeometry();tgeo.setAttribute('position',new THREE.Float32BufferAttribute([sp.x,sp.y,sp.z,sp.x,sp.y,sp.z],3)); const trail=new THREE.Line(tgeo,new THREE.LineBasicMaterial({color:0xffdd00}));trail.visible=trailsOn; scene.add(mesh,wire,trail);trails.push(trail); while(trails.lengthTRAIL_CAP){const o=trails.shift();scene.remove(o);o.userData.gone=true;} shots.push({...s,tau,phase:phaseOf(tau),mesh,wire,trail,target:tg,vel:tg.clone().sub(sp).normalize().multiplyScalar(1.8+Math.random()*1.2),age:0,max:220+Math.random()*60,st:'fly',lockAge:0,sp:sp.clone()});}function burst(n){let k=0;const iv=setInterval(()={for(let i=0;i=n)clearInterval(iv);},60);} // ════════════════════════════════════════════════════════════// SHOT FLIGHT AND SETTLING// ════════════════════════════════════════════════════════════function setTrailEnd(t,x,y,z){if(t.userData.gone||!t.visible)return;const a=t.geometry.attributes.position;a.setXYZ(1,x,y,z);a.needsUpdate=true;}function tickShots(){ for(const h of shots){ if(h.st==='done')continue; const p=h.mesh.position;h.age++; if(h.st==='fly'){ const to=h.target.clone().sub(p),d=to.length(); h.vel.add(to.normalize().multiplyScalar(Math.min(.25,d*.008)));h.vel.multiplyScalar(h.tauh.max){h.st='lock';h.lockAge=0;} }else if(h.st==='lock'){ p.lerp(h.target,.12);h.mesh.rotation.x+=.02;h.mesh.rotation.y+=.015; if(++h.lockAge18)settle(h); }else if(h.st==='shat'){ p.add(h.sv);h.sv.multiplyScalar(.95); h.mesh.material.opacity=Math.max(0,h.mesh.material.opacity-.02);h.wire.material.opacity=Math.max(0,h.wire.material.opacity-.025); if(h.mesh.material.opacity200)shots=shots.filter(h=h.st!=='done'&&h.st!=='star');}function settle(h){ const p=h.mesh.position,R=Math.hypot(p.x,p.z); counts[h.phase]++; records.push({R_kpc:+(R*KPC_PER_U).toFixed(3),P:+h.P.toFixed(4),N:h.N,B:+h.B.toFixed(5),A:+h.A.toFixed(3),tau:+h.tau.toFixed(6),phase:{n:'Noble',l:'Locked',i:'IVA Peak',s:'Shatter'}[h.phase]}); if(h.phase==='s'){h.st='shat';const out=new THREE.Vector3(p.x,0,p.z).normalize();h.sv=out.multiplyScalar(2+Math.random()*2).add(new THREE.Vector3(0,(Math.random()-.5)*2,0));return;} h.st='star';h.r=Math.max(1,R);h.th=Math.atan2(p.z,p.x);h.th0=h.th;h.y0=p.y;h.y=p.y; stars.push(h); if(qOn&&!gravOn){h.tau0=h.tau;h.B0=h.B;h.ph0=h.phase;applyQ(h);} if(gravOn&&h.st==='star'){h.r=Math.max(30,R);initBody(h,false);} while(stars.lengthSTAR_CAP){const o=stars.shift();scene.remove(o.mesh,o.wire,o.trail);o.trail.userData.gone=true;o.st='done';}} // ════════════════════════════════════════════════════════════// FIELD: STATIC, ROTATION ONLY, DENSITY WAVE// ════════════════════════════════════════════════════════════const RC_CO=90, R0=30, EPS=0.6, FLAT=0.15;const omegaAt=r=V0/Math.sqrt(r*r+RC*RC);let lastTick=performance.now();function placeStar(s){ const x=s.r*Math.cos(s.th),z=s.r*Math.sin(s.th); s.mesh.position.set(x,s.y,z);s.wire.position.copy(s.mesh.position);setTrailEnd(s.trail,x,s.y,z);}function tickField(){ const now=performance.now(),dt=Math.min(.05,(now-lastTick)/1000);lastTick=now; if(gravOn){const d=dt*rateMul;simT+=d;tickGrav(d);return;} if(field!=='rot')return; const d=dt*rateMul;simT+=d; const Op=omegaAt(RC_CO),k=1/Math.tan(pitch); for(const s of stars){ const O=omegaAt(s.r); if(arms==='dw'){ const c=Math.cos(M*(s.th-(Op*simT+k*Math.log(s.r/R0)))); s.th+=(Op+(O-Op)*(1-EPS*c))*d; const g=Math.pow(Math.max(0,c),3); s.mesh.material.emissiveIntensity=.05+.95*g;s.mesh.material.opacity=.06+.84*g;s.wire.material.opacity=.04+.86*g; }else s.th+=O*d; s.y+=(s.y0*FLAT-s.y)*Math.min(1,d*.6); placeStar(s); }}function look(s){s.mesh.material.emissiveIntensity=.6;s.mesh.material.opacity=.75;s.wire.material.opacity=.85;}function resetSnapshot(){simT=0;for(const s of stars){s.th=s.th0;s.y=s.y0;look(s);placeStar(s);}} // ════════════════════════════════════════════════════════════// τ MODEL: TOOMRE Q// Q(R) = σ_R κ / (3.36 G Σ). Boundary identification Q = 1 ↔ τ = TL, so τ(R) = TL / Q(R).// ════════════════════════════════════════════════════════════const G_PC = 4.30091e-3; // pc (km/s)² / M☉const RC_KPC = RC*KPC_PER_U;let qOn=false, qIn={sig:46,dis:35,rd:2.6}, ejected=0;function kappa(Rk){const r2=Rk*Rk,c2=RC_KPC*RC_KPC;return Math.sqrt(VFLAT*VFLAT*(2*r2+4*c2))/(r2+c2);} // km/s/kpcfunction Q(Rk){ const sig=qIn.sig*Math.exp(-(Rk-R_SUN)/qIn.rd), dis=qIn.dis*Math.exp(-(Rk-R_SUN)/(2*qIn.rd)); return dis*(kappa(Rk)/1000)/(3.36*G_PC*sig);}function paint(s,t){ const c=tauColor(t);s.mesh.material.color.copy(c);s.mesh.material.emissive.copy(c);s.wire.material.color.copy(c);}function applyQ(s){ const Rk=s.r*KPC_PER_U,t=TL/Q(Rk); s.tau=t;s.B=t*s.P;s.phase=phaseOf(t);paint(s,t); if(s.phase==='s')ejectStar(s);}function ejectStar(s){ const i=stars.indexOf(s);if(i=0)stars.splice(i,1); const p=s.mesh.position;s.st='shat';s.sv=new THREE.Vector3(p.x,0,p.z).normalize().multiplyScalar(2+Math.random()*2); shots.push(s);ejected++;}function setQ(on){ qOn=on;document.getElementById('q-on').classList.toggle('on',on);document.getElementById('q-off').classList.toggle('on',!on); document.getElementById('q-live').style.display=on?'block':'none'; if(on){for(const s of [...stars]){if(s.tau0===undefined){s.tau0=s.tau;s.B0=s.B;s.ph0=s.phase;}applyQ(s);}} else{for(const s of stars){if(s.tau0!==undefined){s.tau=s.tau0;s.B=s.B0;s.phase=s.ph0;paint(s,s.tau);}}} renderQ();renderProfile();caption();}function onQin(){ qIn={sig:Math.max(1,+document.getElementById('q-sig').value||46),dis:Math.max(1,+document.getElementById('q-dis').value||35),rd:Math.max(.5,+document.getElementById('q-rd').value||2.6)}; if(qOn&&!gravOn)for(const s of [...stars])applyQ(s); renderQ();renderProfile();}function qStats(){ let qmin=1e9,rmin=0;for(let R=4.3;R${st.q0.toFixed(2)} · minimum Q = ${st.qmin.toFixed(2)} at ${st.rmin.toFixed(1)} kpc → τ = ${(TL/st.qmin).toFixed(4)} (${(100/st.qmin).toFixed(0)}% of TL).Defaults: R₀, Θ₀ and Rd from Bland-Hawthorn & Gerhard (2016); Σ (stars + gas) and σR are solar-neighbourhood values in the published range. All three inputs are editable.`; if(!qOn)return; const c={n:0,l:0,i:0,s:0};for(const s of stars)c[s.phase]++; const n=stars.length+ejected; let t='PHASELIVESHARE'; for(const [k,name,col] of PH){const v=k==='s'?ejected:c[k];t+=`${name}${k==='s'?' (ejected)':''}${v}${n?(100*v/n).toFixed(1)+'%':'—'}`;} document.getElementById('q-t').innerHTML=t; // Q(R) chart const [x,w,h]=sizeCanvas(document.getElementById('qc')); const L=30,B=16,X=R=L+(w-L-6)*(R-4)/12,qmax=Math.max(4,Math.ceil(Q(16))),Y=q=h-B-(h-B-8)*Math.min(q,qmax)/qmax; x.font='9px "Space Mono", monospace';x.fillStyle='rgba(232,232,240,.4)'; [0,1,2,3,4].filter(q=qx.fillText(q,8,Y(q)+3));[4,8,12,16].forEach(R=x.fillText(R,X(R)-4,h-4)); x.strokeStyle='rgba(255,58,58,.7)';x.setLineDash([3,3]);x.beginPath();x.moveTo(L,Y(1));x.lineTo(w-6,Y(1));x.stroke(); x.strokeStyle='rgba(240,192,96,.6)';x.beginPath();x.moveTo(L,Y(1/0.88));x.lineTo(w-6,Y(1/0.88));x.stroke();x.setLineDash([]); x.strokeStyle='#00ffc8';x.lineWidth=2;x.beginPath();for(let R=4;R{const r1=lo+(hi-lo)*b/nb,r2=lo+(hi-lo)*(b+1)/nb,Rk=(r1+r2)/2*KPC_PER_U,A=Math.PI*((r2*KPC_PER_U)**2-(r1*KPC_PER_U)**2);return c?SigmaKpc2(Rk)*A/c:SigmaKpc2(Rk)*A/Math.max(1,stars.length/nb);});}function massAt(r){const nb=24,lo=30,hi=140,b=Math.min(nb-1,Math.max(0,Math.floor((r-lo)/(hi-lo)*nb)));return massBins[b];}function vcSim(r){return V0*r/Math.sqrt(r*r+RC*RC);}function initBody(s,randomAngle){ const r=Math.max(30,s.r||Math.hypot(s.mesh.position.x,s.mesh.position.z)); const th=randomAngle?Math.random()*2*Math.PI:Math.atan2(s.mesh.position.z,s.mesh.position.x); const Rk=r*KPC_PER_U,sig=qIn.dis*Math.exp(-(Rk-R_SUN)/(2*qIn.rd))/V_U,vc=vcSim(r); s.x=r*Math.cos(th);s.z=r*Math.sin(th);s.y=(s.y0||0)*FLAT; const vr=gauss()*sig,vt=vc+gauss()*sig*0.7; s.vx=vr*Math.cos(th)-vt*Math.sin(th);s.vz=vr*Math.sin(th)+vt*Math.cos(th); s.m=massAt(r);s.members=s.members||1;s.ax=0;s.az=0;s.r=r;s.th=th;}function computeAcc(){ const n=stars.length,e2=SOFT*SOFT; for(const s of stars){s.ax=0;s.az=0;} for(let i=0;i0?B/P:0;a.phase=phaseOf(a.tau);a.tau0=undefined; grM[a.phase]++; paint(a,a.tau);a.mesh.scale.setScalar((2.2+7*Math.min(a.tau,TL*3))*Math.min(3,Math.cbrt(a.members)));a.wire.scale.copy(a.mesh.scale).multiplyScalar(1.02); scene.remove(b.mesh,b.wire,b.trail);b.trail.userData.gone=true;b.st='done'; if(a.phase==='s')a.st='eject';}// Local Toomre Q from the live particles in 2 kpc cells (8 or more stars): Q_loc = σ_R κ / (3.36 G Σ_loc), σ_R the radial velocity dispersion.const CELL=2/KPC_PER_U, CELL_MIN=8;function kappaSim(r){return V0*Math.sqrt(2*r*r+4*RC*RC)/(r*r+RC*RC);}let qLocStats={cells:0,unstable:0,median:null};function localQ(){ const cells=new Map(),key=(i,j)=i*100003+j; for(const s of stars){const k=key(Math.floor(s.x/CELL),Math.floor(s.z/CELL));let c=cells.get(k);if(!c){c={m:0,n:0,vr:0,list:[]};cells.set(k,c);}const r=Math.hypot(s.x,s.z)||1;s._vr=(s.x*s.vx+s.z*s.vz)/r;c.m+=s.m;c.n++;c.vr+=s._vr*s.m;c.list.push(s);} const qs=[]; for(const c of cells.values()){ if(c.na-b); qLocStats={cells:qs.length,unstable:qs.filter(q=q{const c=cells.get(key(Math.floor(s.x/CELL),Math.floor(s.z/CELL)));return c?c.Q:Infinity;};}function mergePass(){ const qAt=localQ(); const cell=SOFT,grid=new Map(),key=(i,j)=i*100003+j; stars.forEach((s,k)={const gi=Math.floor(s.x/cell),gj=Math.floor(s.z/cell),kk=key(gi,gj);if(!grid.has(kk))grid.set(kk,[]);grid.get(kk).push(k);}); const dead=new Set(); stars.forEach((a,ia)={ if(dead.has(ia)||a.st!=='star')return; const gi=Math.floor(a.x/cell),gj=Math.floor(a.z/cell); for(let di=-1;diSOFT*SOFT)continue; const dvx=b.vx-a.vx,dvz=b.vz-a.vz,vesc2=2*G_SIM*(a.m+b.m)/SOFT; // sink-particle criteria: close, bound, converging, and locally Toomre-unstable if(dvx*dvx+dvz*dvzs.st==='star'); }}function tickGrav(d){ if(!stars.length)return; const n=Math.max(1,Math.ceil(d/0.08)),hh=d/n; for(let k=0;kdocument.getElementById(i).disabled=on); if(on){ while(stars.lengthGRAV_CAP){const o=stars.shift();scene.remove(o.mesh,o.wire,o.trail);o.trail.userData.gone=true;o.st='done';} for(const s of stars)if(!s.r)s.r=Math.hypot(s.mesh.position.x,s.mesh.position.z); const area=Math.PI*((135*KPC_PER_U)**2-(36*KPC_PER_U)**2); gravN=stars.length;SOFT=0.5*Math.sqrt(area/Math.max(1,gravN))/KPC_PER_U; buildMass(); for(const s of stars)initBody(s,true); computeAcc(); }else{ for(const s of stars){s.r=Math.max(1,Math.hypot(s.x,s.z));s.th=Math.atan2(s.z,s.x);s.th0=s.th;s.y0=s.y/FLAT;} setField(field); } renderGrav();caption();}function renderGrav(){ const area=Math.PI*((135*KPC_PER_U)**2-(36*KPC_PER_U)**2); document.getElementById('gr-res').innerHTML=gravOn ?`Resolution: softening and fusion distance ε = ${(SOFT*KPC_PER_U).toFixed(2)} kpc, half the mean spacing of the ${gravN} stars present at switch-on. Runs on up to ${GRAV_CAP} stars; gravity starts from a phase-mixed disk (each star keeps its radius and takes a random angle, as after many rotations).` :`Resolution is set by the star count when gravity switches on: ε = half the mean star spacing. Gravity runs on up to ${GRAV_CAP} stars.`; if(!gravOn)return; const cl=stars.filter(s=s.members=3).sort((a,b)=b.members-a.members); const big=[...stars].sort((a,b)=b.members-a.members)[0]; document.getElementById('gr-b').textContent=stars.length; document.getElementById('gr-c').textContent=cl.length; document.getElementById('gr-q').textContent=qLocStats.cells?`${qLocStats.unstable} of ${qLocStats.cells} · median Q = ${qLocStats.median.toFixed(2)}`:'—'; document.getElementById('gr-big').textContent=big&&big.members1?`${big.members} stars · N = ${big.N.toFixed(1)} · ${({n:'Noble',l:'Locked',i:'IVA Peak',s:'Shatter'})[big.phase]}`:'—'; document.getElementById('gr-m').textContent=`${grM.n} · ${grM.l} · ${grM.i} · ${grM.s}`; let t='R kpcstarsNτ/TLQ(R)'; for(const s of cl.slice(0,5)){const Rk=Math.hypot(s.x,s.z)*KPC_PER_U;t+=`${Rk.toFixed(1)}${s.members}${s.N.toFixed(1)}p[0]===s.phase)[2]}"${(s.tau/TL).toFixed(2)}${Q(Rk).toFixed(2)}`;} document.getElementById('gr-t').innerHTML=cl.length?t:'';} // ════════════════════════════════════════════════════════════// CAMERA// ════════════════════════════════════════════════════════════let cam={r:330,th:.6,ph:1.1},tgtCam=null;function placeCam(){camera.position.set(cam.r*Math.sin(cam.ph)*Math.cos(cam.th),cam.r*Math.cos(cam.ph),cam.r*Math.sin(cam.ph)*Math.sin(cam.th));camera.lookAt(0,0,0);}function setCam(v){ tgtCam=v==='top'?{ph:.04,r:320}:v==='edge'?{ph:1.53,r:330}:{ph:1.1,r:330}; ['top','orb','edge'].forEach(k=document.getElementById('v-'+k).classList.toggle('on',(k==='orb'?'orbit':k)===v));}let drag=false,lx=0,ly=0;cv.addEventListener('pointerdown',e={drag=true;lx=e.clientX;ly=e.clientY;cv.setPointerCapture(e.pointerId);});cv.addEventListener('pointerup',()=drag=false);cv.addEventListener('pointermove',e={if(!drag)return;tgtCam=null;cam.th+=(e.clientX-lx)*.005;cam.ph=Math.max(.03,Math.min(1.56,cam.ph-(e.clientY-ly)*.005));lx=e.clientX;ly=e.clientY;});cv.addEventListener('wheel',e={e.preventDefault();tgtCam=null;cam.r=Math.max(60,Math.min(900,cam.r*(1+e.deltaY*.001)));},{passive:false}); // ════════════════════════════════════════════════════════════// READOUTS// ════════════════════════════════════════════════════════════const PH=[['n','Noble','#00ffc8'],['l','Locked','#9b7dff'],['i','IVA Peak','#f0c060'],['s','Shatter','#ff3a3a']];function expected(){if(gen==='int')return INT_EXPECTED;const t=mix.n+mix.l+mix.i+mix.s||1;return {n:100*mix.n/t,l:100*mix.l/t,i:100*mix.i/t,s:100*mix.s/t};}function renderMix(){ const n=counts.n+counts.l+counts.i+counts.s,ex=expected(); let h='PHASEEXPECTEDOBSERVED±'; for(const [k,name,col] of PH){ const p=ex[k]/100,obs=n?100*counts[k]/n:null,band=n?200*Math.sqrt(p*(1-p)/n):null; const ok=n?Math.abs(obs-ex[k])${name}${ex[k].toFixed(1)}%${n?obs.toFixed(1)+'%':'—'}${n?band.toFixed(1):'—'}${n=30?`${ok?'WITHIN':'OUTSIDE'}`:''}`; } h+=`settled${n}`; document.getElementById('mix-t').innerHTML=h;}function sizeCanvas(c){const w=c.clientWidth,h=c.clientHeight;if(c.width!==w*devicePixelRatio){c.width=w*devicePixelRatio;c.height=h*devicePixelRatio;}const x=c.getContext('2d');x.setTransform(devicePixelRatio,0,0,devicePixelRatio,0,0);x.clearRect(0,0,w,h);return [x,w,h];}function renderProfile(){ const [x,w,h]=sizeCanvas(document.getElementById('prof')); const lo=4,hi=16,nb=6,bins=Array.from({length:nb},()=({n:0,l:0,i:0,s:0,t:0})); const tsum=new Array(nb).fill(0),tn=new Array(nb).fill(0); const add=(Rk,k,t)={const b=Math.min(nb-1,Math.max(0,Math.floor((Rk-lo)/(hi-lo)*nb)));bins[b][k]++;bins[b].t++;if(t!==undefined){tsum[b]+=t/TL;tn[b]++;}}; document.getElementById('prof-note').textContent=(qOn?'Live share of each phase by distance from Sag A* (kpc), with τ = TL/Q(R). Rings where Q drops toward 1 move toward IVA; rings with Q below 1 shatter out.':'Share of each phase by distance from Sag A* (kpc). With τ drawn independently of radius, every ring holds the same mix.')+' White line: mean τ in each ring as a fraction of TL (dashed line = TL).'; if(gravOn){for(const s of stars)add(Math.hypot(s.x,s.z)*KPC_PER_U,s.phase,s.tau);} else if(qOn){for(const s of stars)add(s.r*KPC_PER_U,s.phase,s.tau);} else for(const r of records)add(r.R_kpc,{Noble:'n',Locked:'l','IVA Peak':'i',Shatter:'s'}[r.phase],r.tau); const L=26,B=16,bw=(w-L-4)/nb; x.font='9px "Space Mono", monospace';x.fillStyle='rgba(232,232,240,.4)'; x.fillText('100%',0,10);x.fillText('0',14,h-B); bins.forEach((b,i)={ let y=h-B;const bx=L+i*bw+2; if(b.t)for(const [k,,col] of PH){const hh=(h-B-6)*b[k]/b.t;x.fillStyle=col;x.globalAlpha=.85;x.fillRect(bx,y-hh,bw-4,hh);y-=hh;} x.globalAlpha=1;x.fillStyle='rgba(232,232,240,.45)';x.fillText((lo+(hi-lo)*(i+.5)/nb).toFixed(0),bx+bw/2-6,h-4); }); // mean τ/TL per ring (0 at the bottom, TL at the top) const Yt=v=h-B-(h-B-6)*Math.min(1.25,v)/1.25; x.strokeStyle='rgba(255,255,255,.35)';x.setLineDash([2,3]);x.beginPath();x.moveTo(L,Yt(1));x.lineTo(w-4,Yt(1));x.stroke();x.setLineDash([]); x.fillStyle='rgba(255,255,255,.6)';x.fillText('TL',w-16,Yt(1)-2); x.strokeStyle='#ffffff';x.lineWidth=2;x.beginPath();let st=false; for(let i=0;itn[i]?+(s/tn[i]).toFixed(4):null);}function renderCurve(){ const [x,w,h]=sizeCanvas(document.getElementById('rc')); const L=30,B=16,rmax=135,X=r=L+(w-L-6)*r/rmax,Y=v=h-B-(h-B-8)*v/260; x.strokeStyle='rgba(232,232,240,.12)';x.font='9px "Space Mono", monospace';x.fillStyle='rgba(232,232,240,.4)'; [0,100,200].forEach(v={x.beginPath();x.moveTo(L,Y(v));x.lineTo(w-6,Y(v));x.stroke();x.fillText(v,2,Y(v)+3);}); [0,4,8,12,16].forEach(k=x.fillText(k,X(k/KPC_PER_U)-(k9?6:3),h-4)); x.strokeStyle='#00ffc8';x.lineWidth=2;x.beginPath(); for(let r=0;rτ = B/P. It settles at a distance set by its Pattern and on a spoke set by its Narrative. Shots past the Torsion Limit shatter and fly off into the halo. With no outside force, the picture is a frozen snapshot.', rot:'Now the disk spins the way real galaxies do: stars near the center go around faster than stars far out. Watch the straight spokes bend into spiral arms, then keep winding until they smear. Real galaxies keep their arms, so something else must hold them.', dw:'A density wave holds the arms: a spiral pattern that turns as one piece while stars flow through it, slowing down as they cross it, like cars through a traffic jam. The arms stay; the stars keep moving.'}; const R={ static:'Static, Fext = 0. Settle radius r = 25 + 11P (scene units; outer edge 16 kpc), angle 2πN/10, height from A. τ is drawn per phase band and B = τP, so phase is independent of radius by construction. Shatter shots (τ ≥ TL) are ejected radially and fade.', rot:'Rotation only. Ω(R) = v(R)/R with v = vflatR/√(R²+Rc²). Differential rotation shears radial spokes into trailing spirals within about one outer orbit, then winds them ever tighter: the winding problem. The disk thins to 15% of its snapshot height (imposed).', dw:`Density wave (Lin and Shu, 1964): an m = ${M}, ${Math.round(pitch*180/Math.PI)}° logarithmic spiral pattern rotates rigidly at the angular speed of the 10.7 kpc corotation radius. Stars move through it with angular speed Ωp + (Ω − Ωp)(1 − 0.6 cos mΔθ), so they linger near the crest and the arms persist. Brightness marks the crest.`}; const key=field==='static'?'static':arms==='dw'?'dw':'rot'; let cap=(mode==='learner'?L:R)[key]; if(gravOn)cap=mode==='learner' ?'Gravity is on. Every star now pulls on every other star while the galaxy turns. Where the disk is close to breaking apart, stars gather into clumps; when two meet gently in a spot that is falling together, they fuse into one body. A fused body that crosses the Torsion Limit shatters and is thrown out.' :'Gravity on. Leapfrog integration of softened Newtonian self-gravity (G, Σ(R)) on top of the measured rotation curve, with the azimuthal mean of the self-pull removed. Pairs fuse by the GAMCollider 2-beam rule under sink-particle criteria (within ε, bound, converging, local Q τ = TL/Q is on: each star now takes its torsion from how close the disk is to breaking apart at its distance. Q = 1 is the breaking point, matched to the Torsion Limit.' :' τ = TL/Q on: τ(R) = TL/Q(R), boundary identification Q = 1 ↔ TL. Q −R/Rd, Rd from the τ MODEL inputs), and P follows from radius. ':'P is drawn on a log scale from 1 to 10. ')+'τ is drawn from the band mix; B = τ × P. Every phase, including the IVA corridor, fills on purpose.' :'Whole numbers 1 to 10, with B biased to 0 or 1. Only P ≥ 8 can carry B = 1 below TL (1/TL = 7.30), and the IVA corridor holds a single value, 1/8.';} // ════════════════════════════════════════════════════════════// CONTROLS// ════════════════════════════════════════════════════════════const on=(ids,id)=ids.forEach(i=document.getElementById(i).classList.toggle('on',i===id));function setMode(m){mode=m;document.body.classList.toggle('res',m==='res');on(['m-l','m-r'],m==='res'?'m-r':'m-l');caption();renderMix();}function setGen(g){gen=g;on(['g-tl','g-int'],'g-'+g);document.getElementById('mix-wrap').style.display=g==='tl'?'block':'none';caption();renderMix();}function onMix(){mix={n:+document.getElementById('mx-n').value||0,l:+document.getElementById('mx-l').value||0,i:+document.getElementById('mx-i').value||0,s:+document.getElementById('mx-s').value||0};renderMix();}function setRS(r){radSrc=r;on(['rs-p','rs-d'],'rs-'+r);caption();}function setSpawn(d){spawnDir=d;on(['sp-out','sp-in'],'sp-'+d);}function setField(f){field=f;on(['f-st','f-rot'],f==='static'?'f-st':'f-rot');['a-rot','a-dw'].forEach(i=document.getElementById(i).disabled=f!=='rot');caption();}function setArms(a){arms=a;on(['a-rot','a-dw'],'a-'+a);if(a==='rot')stars.forEach(look);caption();}function setM(m){M=m;on(['m2','m4'],'m'+m);caption();}function onPitch(){const v=+document.getElementById('pitch').value;pitch=v*Math.PI/180;document.getElementById('pitch-v').textContent=v+'°';caption();}function onRate(){rateMul=Math.pow(2,+document.getElementById('rate').value);document.getElementById('rate-v').textContent='×'+(rateMult.visible=trailsOn);const b=document.getElementById('b-tr');b.classList.toggle('on',trailsOn);b.textContent=trailsOn?'TRAILS ON':'TRAILS OFF';}function toggleAuto(){autoRot=!autoRot;document.getElementById('b-ar').classList.toggle('on',autoRot);}function clearAll(){ for(const h of shots)scene.remove(h.mesh,h.wire,h.trail);for(const s of stars)scene.remove(s.mesh,s.wire,s.trail);for(const t of trails)scene.remove(t); shots=[];stars=[];trails=[];records=[];counts={n:0,l:0,i:0,s:0};simT=0;ejected=0;grM={n:0,l:0,i:0,s:0};renderMix();renderQ();renderGrav();} // ════════════════════════════════════════════════════════════// EXPORT// ════════════════════════════════════════════════════════════function dl(name,text,type){const a=document.createElement('a');a.href=URL.createObjectURL(new Blob([text],{type}));a.download=name;a.click();setTimeout(()=URL.revokeObjectURL(a.href),1000);}function exportJSON(){ const n=counts.n+counts.l+counts.i+counts.s; dl('galaxy_session.json',JSON.stringify({tool:'Galaxy · powered by AxiomForge',generated:new Date().toISOString(), constants:{TL,TL_IVA,OMEGA0},settings:{radiusFrom:radSrc==='d'?'exponential disk':'P log scale',generator:gen,bandMix:mix,spawn:spawnDir,field,arms,armCount:M,pitchDeg:Math.round(pitch*180/Math.PI),timeRate:rateMul,vflat_kms:VFLAT,edge_kpc:16}, tauModel:qOn?{model:'tau = TL/Q (Toomre)',inputs:qIn,R0_kpc:R_SUN,Theta0_kms:VFLAT,Q_R0:+Q(R_SUN).toFixed(4)}:'band mix',ejected,gravity:gravOn?{on:true,softening_kpc:+(SOFT*KPC_PER_U).toFixed(3),fusions:grM,bodies:stars.length,clumps:stars.filter(s=s.members=3).map(s=({R_kpc:+(Math.hypot(s.x,s.z)*KPC_PER_U).toFixed(2),stars:s.members,N:+s.N.toFixed(2),tau:+s.tau.toFixed(6)}))}:{on:false},elapsed_Myr:+(simT*MYR_PER_SIMSEC).toFixed(1),settled:n,counts,expectedPct:expected(),records},null,2),'application/json');}function exportCSV(){dl('galaxy_session.csv','R_kpc,P,N,B,A,tau,phase\n'+records.map(r=[r.R_kpc,r.P,r.N,r.B,r.A,r.tau,r.phase].join(',')).join('\n'),'text/csv');} // ════════════════════════════════════════════════════════════// LOOP// ════════════════════════════════════════════════════════════function resize(){const w=viewEl.clientWidth,h=viewEl.clientHeight;renderer.setSize(w,h,false);camera.aspect=w/h;camera.updateProjectionMatrix();}window.addEventListener('resize',resize);let frame=0;function loop(){ requestAnimationFrame(loop);frame++; if(tgtCam){cam.ph+=(tgtCam.ph-cam.ph)*.08;cam.r+=(tgtCam.r-cam.r)*.08;if(Math.abs(tgtCam.ph-cam.ph)
cite & interoperate
Trent III, Russell Vernon. (2026). Applied Identity Physics: Galaxy™ Formation from a browser, Powered by AxiomForge™, a Guide to the Fields, τ Models, Gravity and Applications. https://doi.org/10.5281/zenodo.23484265
@article{datacite105281zenodo2348,
title = {Applied Identity Physics: Galaxy™ Formation from a browser, Powered by AxiomForge™, a Guide to the Fields, τ Models, Gravity and Applications},
author = {Trent III, Russell Vernon},
year = {2026},
doi = {10.5281/zenodo.23484265}
}
JSON · citations JSON · CITO argument graph · IIIF v3 manifest · embed card