Repository navigation
cvc::lsys + cvc::world: headless L-system terrain generator - #360
Merged
Merged
Conversation
A GL-free, deterministic, multi-material terrain generator that emits
occupancy + material rasters for training/gym consumers (roadmap L0/L1;
dbg-technical/21 §5 item 3).
cvc::lsys — the L-system engine: hashed noise-based RNG (insertion-stable,
no std::mt19937), expression VM, .lsys parser/writer (byte-exact round-trip),
parallel + sequential-priority derivation with gen_nested detection, turtle +
scope interpreter, stats/SVG/OFF emitters, a built-in recipe library (pine/
oak/birch/shrub/boulder/office/house), and the cvc-lsys CLI.
cvc::world — the generator + raster seam: the 32-class §16.2 surface registry
(hard classes carry rho=0) + 5 outdoor building-shell classes, each tagged with
a generic rf_material name from the shared 12-name vocabulary (+ rock); an
analytic metre-scaled band-limited heightfield; parameterized, insertion-stable
scatter (seed / count / size / species / bounds); grid_spec + raster() ->
{klass, risk_raw, hard, occupancy, height, layer_owner} in the consumer frame
(cell_w=(max-min)/(cols-1), row 0=min_y); a .npy writer + cvcworld/2 bundle with
PNG previews; and the cvc-worldgen CLI.
Invariants asserted + tested: risk_raw==registry[klass].rho, hard==registry
[klass].hard, hard subset occupancy, deterministic across repeats. cvc::world
references no cvc::nav (file seam, not ABI) — enforced at configure time along
with a no-<random> determinism guard. Buildings tile into many occupied cells
(the many-small-discs physics caveat). 78 GoogleTests; new code ~85% line
coverage; tools excluded from the coverage gate.
transfix
force-pushed
the
feat/lsystem-lab-core
branch
from
September 14, 2026 04:48
8678290 to
042238b
Compare
transfix
added a commit
that referenced
this pull request
Sep 14, 2026
New minor version carrying the cvc::lsys + cvc::world headless terrain generator (#360). Bumps project(VERSION) 3.3.0 -> 3.4.0 and every cvcpkg recipe's upstream_version to match (cvc_revision reset to 1, per the recipe-version gate), so a libcvc 3.4.0 with cvc::world can be published for the DBG world_scene adapter.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A GL-free, deterministic, multi-material terrain generator that emits occupancy + material rasters for training/gym consumers (roadmap L0/L1;
docs/roadmap/LSYSTEM-LABORATORY-ROADMAP.md). Replaces the dead-end monolithiclsystem_forestdemo (single hardcodedmt19937, compile-time grammar, no materials, render-only CLI) with a reusable library.cvc::lsys— the L-system engineHashed noise-based RNG (insertion-stable, no
std::mt19937), expression VM,.lsysparser/writer (byte-exact round-trip), parallel + sequential-priority derivation withgen_nesteddetection, turtle + scope interpreter,stats/svg/offemitters, a built-in recipe library (pine/oak/birch/shrub/boulder/office/house), and thecvc-lsysCLI.cvc-lsys svg pine_monopodial --gen 10 --out t.svgrenders a tree you can open in the diff.cvc::world— the generator + raster seamThe §16.2 32-class surface registry (hard classes carry ρ=0) + 5 outdoor building-shell classes, each tagged with a generic
rf_materialname from the shared 12-name vocabulary (+rock); an analytic metre-scaled band-limited heightfield; parameterized, insertion-stable scatter (seed / count / size / species / bounds);grid_spec+raster()→{klass, risk_raw, hard, occupancy, height, layer_owner}in the consumer frame (cell_w=(max-min)/(cols-1), row 0 = min_y); a.npywriter +cvcworld/2bundle with PNG previews; and thecvc-worldgenCLI.cvc-worldgen build --seed N --previewwrites annp.load-able bundle + previews.Invariants (asserted + tested)
risk_raw==registry[klass].rho,hard==registry[klass].hard,hard ⊆ occupancy, deterministic across repeats/threads; buildings tile into many occupied cells (the many-small-discs physics caveat).cvc::worldreferences nocvc::nav(file seam, not ABI) — enforced at configure time, alongside a no-<random>determinism guard.Consumers
The raster's occupancy+material feeds a downstream occupancy → obstacles seam;
risk_raw+hardfeedcvc::nav::material_buildfor the gym (verified). Consumer-side wiring (rock material, adapter, gym) is coordinated separately and lands after this PR + a version bump.Tests / CI
78 GoogleTests (
ctest -R 'Lsys|World'); newsrc/cvc/{lsys,world}code ~85% line coverage; thecvc-lsys/cvc-worldgenCLI mains are excluded from the coverage gate (src/cvc/tools/*).Determinism note:
-ffp-contract=offgives per-platform bit-reproducibility and cross-platform-stable content hashes / module counts / ontology hash; raw.npybytes are reproducible on a fixed toolchain but not asserted bit-identical across libm implementations (scatter/interp route yaw throughsin/cos).