Skip to content

Fix galaxy, math_rain and strange_attractors (#7), quickstart, real GIFs, 0.2.1 - #8

Merged
Mattbusel merged 1 commit into
mainfrom
fix-demos-0.2.1
Sep 26, 2026
Merged

Mattbusel merged 1 commit into
mainfrom
fix-demos-0.2.1

Conversation

@Mattbusel

Copy link
Copy Markdown
Owner

Closes #7.

before and after

Left and middle: frames captured on this PC before the change (the blown-out first second, then empty). Right: the same demos after, captured today with PROOF_HIDDEN=1 PROOF_FIXED_DT=60 PROOF_SHOT=....

Why they broke

  • life_function is used by the renderer as a glyph scale. galaxy gave every star Orbit { radius: 1..25 } and math_rain gave glyphs Linear { offset: y }, so glyphs were drawn 5 to 25 times their size: the white and cyan walls.
  • Strong inverse-square gravity (galaxy), a flow field (math_rain) and seven overlapping attractor fields (strange_attractors) acted on glyphs of mass 0.01 to 0.1, so within a second everything was flung off screen.
  • Separately, initial_state(Dadras) sat on an invariant line and decayed to the origin, and initial_state(Rabinovich) diverged to NaN.

Changes

  • The three demos now compute positions from their equations every frame: orbits with mild differential rotation (galaxy), falling columns with logistic-map flicker (math_rain), RK4 per point on each attractor fitted to its measured extent (strange_attractors, now on run_ui with labels). Stable indefinitely.
  • Standard seeds for Dadras and Rabinovich, plus a unit test that every attractor settles onto a finite non-trivial state.
  • ProofEngine::run honours input.quit_requested like run_ui.
  • New quickstart example, used verbatim in the README's 3 steps and the crate docs; docs open with a runnable doc test.
  • README: plain one-sentence intro, hero GIF, install table, 3 steps, real results; absolute image URLs so the crates.io page renders. GIFs in assets/gifs/, all from hidden-window captures today, each under 3.3 MB. Old 4 MB supernova GIF replaced.
  • Site: quickstart code and result frames, galaxy/strange_attractors/math_rain videos.
  • Version 0.2.1, CHANGELOG, crate metadata (description, keywords, categories, homepage, documentation).

Tests: sh ci/test-lib.sh 4838 passed locally; doc tests pass.

…; real GIFs; 0.2.1

- The three demos compute positions from their equations every frame instead
  of feeding huge life_function scales and strong fields to light glyphs.
- Dadras and Rabinovich initial states no longer collapse or diverge; test added.
- ProofEngine::run honours quit_requested.
- quickstart example, crate docs with a runnable doc test, README top rewritten
  with install table, 3 steps and results from real hidden-window captures.
- Site: quickstart code and result frames, demo videos.

Closes #7
@Mattbusel
Mattbusel merged commit 338743d into main Sep 26, 2026
3 checks passed
@Mattbusel
Mattbusel deleted the fix-demos-0.2.1 branch September 26, 2026 00:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

galaxy, math_rain and strange_attractors render a blown-out frame, then an empty scene

1 participant