Rendering README Assets ======================= The PNG figures committed under ``docs/assets/`` are generated by ``viz.render_readme_assets``. They are produced from the real TrackGen runtime pipeline with fixed seeds and default geometry parameters, then written to disk so they can be displayed by GitHub. How to regenerate ----------------- Run the module from the repository root: .. code-block:: bash .venv/bin/python -m viz.render_readme_assets The script prints the path of each file it writes. What gets written ----------------- ``render_readme_assets()`` regenerates **all** committed figures in one call. The figures it produces are: .. list-table:: :header-rows: 1 :widths: 35 65 * - File - Contents * - ``docs/assets/readme-generator-grid.png`` - Five representative raw centerlines from each of the six standard generators (30 panels total), rendered at fixed seeds. * - ``docs/assets/readme-pipeline-stages.png`` - A single Bezier sample shown at four pipeline stages: raw generated centerline, constant-spacing resample, XPBD-relaxed band, and the final inflated road. * - ``docs/assets/readme-generator-strip.png`` - One representative raw centerline per standard generator in a single horizontal strip. * - ``docs/assets/readme-gate-strip.png`` - Gate self-collision relaxation illustrated for each **gate** generator (``bezier``, ``checkpoint``, ``hull``, ``polar``, ``voronoi`` — ``repulsive`` is not a registered gate generator, so it is not in this strip): raw anchors (top row) and separated gates with tangent frames and gate-width bars (bottom row). * - ``docs/assets/batch-of-tracks.png`` - The eight roundest valid, inflated track bands from one deterministic CPU batch at the track tutorial's default geometry (``half_width=0.03``), shown as filled constant-width road bands. CPU, deterministic. * - ``docs/assets/generator-.png`` (six files) - Per-generator panel showing five representative raw centerline outputs. One file per standard generator (``bezier``, ``checkpoint``, ``hull``, ``polar``, ``voronoi``, ``repulsive``). * - ``docs/assets/relaxation-before-after.png`` - Same seeds, top row raw constant-spacing centerlines (``relax_enable=False``, centerline-only), bottom row the relaxed and inflated constant-width band, in the metric benchmark regime. * - ``docs/assets/relaxation-same-seeds.png`` - Identical seeds through the old relax solver (plain Jacobi, 150 sweeps) and the new default solver (Chebyshev, 50 sweeps) — the visual same-fixed-point comparison. * - ``docs/assets/relaxation-smoothing.png`` - The four noisiest valid tracks generated twice with identical seeds — without the post-solve smoothing tail (top row) and with the defaults (bottom row) — plus a zoom on the worst rippled border segment. Each panel is titled with its curvature-noise metric (dkappa RMS). CPU, deterministic. * - ``docs/assets/relaxation-convergence.png`` - **Measured** valid-track yield vs ``relax_iters`` for the old and new relax solvers (library defaults, E=2048). This one figure is a real **CUDA** measurement: on a GPU-free machine ``render_relaxation_convergence()`` prints a note and is skipped, so the committed asset must come from a GPU run. .. warning:: ``render_readme_assets()`` **rewrites every figure unconditionally**. If you run it and only one figure was supposed to change, all the others are still overwritten (with fresh but deterministic content). Review ``git diff --stat docs/assets/`` before committing, and stage only the files you actually intended to update. Implementation notes -------------------- The function lives in ``viz/render_readme_assets.py``. It calls ``TrackGenerator`` on the ``cpu`` device with a small batch (24 environments) and fixed seeds, so results are deterministic and GPU-free — with one exception: ``relaxation-convergence.png`` is a real yield measurement and requires CUDA (it is skipped, with a printed note, when no GPU is available). Individual helper functions — ``render_generator_panels()``, ``render_gate_assets()``, and ``render_relaxation_assets()`` — can be called independently if only a subset of assets needs to be rebuilt; all are defined in the same module. Relaxation iteration-evolution video ------------------------------------ The relaxation convergence page embeds a short video, rendered by a **separate** standalone script (it is *not* part of ``render_readme_assets()`` because it requires ``ffmpeg``): .. code-block:: bash .venv/bin/python -m viz.render_relaxation_video It writes two files under ``docs/_static/`` (which Sphinx copies verbatim into the build, unlike ``docs/assets/`` which is not reachable from raw-HTML ``