Galaxy Shell / docs

Black-hole wallpaper: physical model

openspec/changes/archive/2026-11-05-black-hole-physics/design.md · Editar no GitHub ↗

Esta página ainda não tem tradução em português. O conteúdo abaixo está em inglês.

Este documento registra decisões, planejamento ou evidências de uma etapa do projeto. Não implica que todos os itens estejam implementados ou validados na versão atual.

Nesta página

Black-hole wallpaper: physical model

Doc status: history. Withdrawn on 2026-11-05; see hex-crystals-wallpaper.md, Reference look. Checked 2026-11-10.

Withdrawn on 2026-11-05. After the first login with this revision the owner found the stars and the disk strange ("ficou estranho", "O disco também") and gave a visual reference. The shader now starts from commit d0be793, with the three star drifts at three times their speed and the look of that reference. See Reference look in the wallpaper notes. Nothing below describes the current shader. It stays as the record of this attempt, whose commits are 87c95b3, 5ca54dc, 7e70c23 and 54468e6.

The 2026-11-05 revision supersedes the drifting screen-space stars and emitting plunge described in the historical wallpaper/QA notes. The project and product website use vendor/interface/host/wallpaper-digital.js; rebuild the protected wallpaper bundle and the product HTML after changing it.

Scope and corrections

The scene represents a nonrotating Schwarzschild black hole, using the event horizon radius as one length unit. Distant stars are fixed angular sources on a celestial sphere. They do not have three screen-space drift speeds or atmospheric twinkle. A fixed observer would see fixed star images, so the observer orbits the hole slowly (see Orbiting observer below); pointer-driven changes to the view can also move the images. Proximity on the screen does not mean a star is near the hole in three-dimensional space.

Both disk and sky use the same backward integrated rays. Only escaping rays receive sky radiance, reduced by intervening disk opacity. Captured rays receive no background stars. This replaces the independent, bounded screen-space warp, so multiple/inverted sky images and stretched stellar images arise from the lens rather than from stars being pulled into the hole.

The luminous thin disk starts outside the innermost stable circular orbit at r = 3 (equivalently 6 GM/c²). Emission from the unstable plunging region is omitted in this model; this is not a claim that plunging gas can never emit. The temperature envelope uses the zero-torque thin-disk shape T⁴ ∝ r⁻³ (1 - sqrt(r_inner/r)), with an artistic color scale and exposure.

Gas texture follows dr/dt = -0.24/sqrt(r) and dphi/dt = 2.1/r^1.5. The advected coordinates r^1.5 + 0.36 t and phi + 8.75 log(r) are constant along these paths. The displayed angular material coordinate subtracts (8.75/1.5) log(r^1.5 + 0.36 t) from the spiral invariant; this lets identifiable knots circulate instead of emphasizing a fixed spiral pattern. Rotation dominates the slow inward drift and speeds up inward. The clock is illustrative, with no chosen physical mass/time scale.

Local circular speed is beta = sqrt(1/(2(r - 1))), not a fixed speed at every radius. Doppler and gravitational frequency shifts include the Lorentz factor and the camera's finite radius. Coordinate ray tangents are converted to local orthonormal directions using the Schwarzschild radial metric before computing the Doppler angle. The shader follows rays backwards, so emitted photons travel opposite that direction. Specific intensity scales approximately as shift³; approaching material brightens and receding material dims. Opacity multiplies both the source contribution and the transmission to deeper crossings.

The apparent arcs are lensed images of a flat disk. They are not a physically vertical ring of gas. The black region is the capture shadow, not a painted circle claiming to show the actual horizon size.

Orbiting observer

On 2026-11-05, after the revision that fixed the sky, the owner asked for stars that move more and accepted three times the earlier speed ("Sim, 3x"). That number referred to the old screen-space drift of 2 pixels per second of the 720p target, as a mean over the stars. The three drift speeds stay retired, because they cannot pass through the lens. The escaped rays now turn around the disk axis before the sky lookup, which is what an observer on a slow orbit at a constant radius sees. The disk is axially symmetric, so the sky is the visible part of that motion.

One turn takes 600 s, in the direction of the gas, so the sky moves to the left at about 6.5 pixels per second of the target at the screen center and about 10 near the edges (about 10 and 15 on a 1080p output). A real orbit at this radius has no such period: the clock is illustrative, as for the gas. The orbit applies no aberration and does not move the gas pattern with the observer.

These speeds hold for the weakly lensed sky. Images near the ring are magnified by the lens and can move faster or in another direction.

The period divides the 3600 s wrap of the clock, so the sky has no jump. The turn adds one rotation per ray sample, two per pixel, with no new pass, texture or step. It runs after the ray loop, so the filtered cube lookup and its derivatives keep their footprint. The pointer tilt and the camera stay as they were.

Limits

This remains a real-time illustration, not a scientific GRMHD or spectral radiative-transfer simulation. The adaptive finite-step integrator has 256 steps per ray, two samples per pixel and a finite escape boundary at radius 25. Near-critical rays can exhaust that budget. Very small stellar images and photon subrings can alias, and the celestial map has finite angular resolution. The disk is a thin procedural surface, with approximate opacity and palette, not a solved plasma. It omits spin, retarded emission times, gas self-gravity, scattering and a physically calibrated spectrum. Bloom and display mapping are artistic camera effects. Do not claim quantitative physical accuracy or measured hardware performance from this implementation.

Window-closing suction is a UI metaphor in native/wgpu-renderer/src/effects/black-hole-core.wgsl, not an astrophysical model. Its lifetime, protected channels and compatibility remain as documented in Black-hole window closing. No desktop session restart is needed to publish sources; an already running wallpaper does not adopt a rebuilt bundle until its normal reload/next login.

References

Verification

The existing isolated wallpaper browser test checks shader compilation, animated gas, the sky speed and its period, pointer response, text caps, reduced motion, context recovery and stream/CSP behavior. The sky regression replaces the historical assertion requiring unrelated background star drift. It is a rendering regression, not a proof of astrophysical correctness.

Checks on 2026-11-05

The protected bundle, site build, syntax/lint, bundle consistency, formatting, HTML parse and inline-script syntax checks passed. The focused wallpaper unit selection passed 135 tests. The browser black-hole checks passed compilation, animation, fixed sky, sink replies, fixed-clock pointer response and text caps.

A numerical integration cross-check used the analytic Schwarzschild capture threshold b = 3 sqrt(3) / 2 in horizon-radius units. The old 192-step budget incorrectly classified the escaping b = 2.61 ray by exhaustion. The 256-step budget resolves it, while retaining adaptive step sizes. This does not resolve arbitrarily close approaches to the critical orbit or measure GPU performance.

The full suite was attempted locally but did not pass: Linux core startup lacks flock on this Mac, an application-icon fixture fails, and startup-dependent tests stall. Those stalled test processes were stopped. Native Electron/Smithay session validation is unavailable here; no live desktop was restarted. The browser suite also fails the unrelated crystal-palette sampling assertion; that failure was reproduced using the previous committed wallpaper bundle. Neither a wholly green suite nor native desktop QA is claimed.

Visual regression correction

The first revision became pale and the motion was hard to read. Commit a0a2e0e temporarily restored the previous cinematic shader. Following the owner's instruction to correct rather than revert, the physical revision was reinstated with the following corrections:

  • The color display uses a lower, nonlinear false-color temperature mapping, separate from the physical temperature and frequency-shift calculations. The previous linear mapping clipped much of the disk to similar pale tones. Visible warm detail and brightness asymmetry are preserved without changing the Schwarzschild disk, sky lensing or local Doppler/gravity terms.
  • The illustrative material clock runs three times faster than the first physical revision. There is no specified black-hole mass or calibrated time scale. The ratio of slow radial drift to faster circular motion is unchanged.
  • Both radial and angular material coordinates are backtraced to move the visible gas knots through the disk, rather than emphasizing stationary bands.
  • Sky lookup uses four nearest cells instead of nine, retaining the same compact angular sources and seam handling. The render target and frame schedule stay unchanged; physical-GPU timing remains unmeasured.

The rendering regression now checks motion in emitting disk pixels and the warm palette, in addition to fixed sky locations. It no longer treats any frame hash change as sufficient evidence of visually readable animation. Local screenshots with a fixed pointer also show changed gas structure; they are kept outside Git. The unrelated crystal-palette sampling failure remains outside this correction.

Filtering lensed stars during pointer motion

The owner reported that the small lights around the center looked unstable when the mouse moved. The ray directions change rapidly near the critical orbit; point-evaluating very narrow procedural stars undersampled that sky mapping. The two subpixel ray samples did not filter the corresponding angular footprint.

The same procedural celestial field is now baked once per WebGL context into six 512x512 cube faces, limited by the GPU's maximum cube-map size. Linear radiance is stored at half scale in RGBA8, then mipmaps are generated. Trilinear minification selects the sky footprint for each traced ray. The texture lookup runs after the ray loop and outside the capture branches so implicit derivatives are defined. Escape/transmission still hides stars on captured rays and behind disk crossings. The cube representation avoids the longitude seam in derivative-based sampling.

All six base faces are allocated before rendering them. Mipmapping is enabled only after generation. The existing framebuffer is reused for the one-time bake; normal animation still makes two draw calls per frame. Resizing reuses the sky, context recovery recreates it, and disposal releases the extra program/texture. The cube plus mip levels costs at most 8 MiB. No new extensions, dependencies, network requests, frame-rate changes or desktop restart are required. Disk gas, color/exposure and pointer response are retained. This is spatial filtering, not temporal accumulation, and does not establish zero aliasing at every scale.

Validation includes the wallpaper lifecycle/resource tests, GPU compilation, fixed sky and moving warm gas, pointer response, context recovery and site locale checks. A fixed-clock probe takes five rendered samples after pointer settling at x=0.492..0.508, y=0.5, tracking a neutral-light proxy around the upper shadow. This checks integrated brightness stability; it is not a proof of individual star trajectories or physical photometry. The prior crystal-palette sampling failure remains separate. Mouse movement in the page preview was also exercised; local screenshots stay outside Git. No video or live-desktop activation occurred.

API references: OpenGL ES 2.0 texture cube selection and filtering, WebGL mipmap generation.

Checks of the orbiting observer

The browser check of the fixed sky is replaced: the sky must not change at one clock, must change after 10 s, must come back after 600 s, and must move left at about 10 target pixels per second in the sampled corner. It measured 10.0. The history above that says "fixed sky" describes the earlier revision.

A private nested run (9edac991, one output of 1848x984, no provider) selected the effect through Aparencia. Two captures about 10 s apart show the stars in the top right and bottom right bands displaced by 128 to 133 pixels to the left, so about 12 to 13 pixels per second near the edge of that output. Eight captures in a row kept the brightest star of the top right band between 127 and 139 of 255. That is a coarse check of flicker, not a measure of it, and no video was recorded. The GPU process of the run used 38.7% of the graphics engine over 10 s on the Radeon RX 550, about 12.9 ms per frame at 30 fps, with the live session sharing the card. This is one reading for the whole physical revision plus the turn, with no separate baseline of the turn itself. The live session was not touched.