Files
VoxelForge/Standalone/Research/WorldAssemblerM3/Linux53/BuildProfileFixturesL53.py
T
Fr0zkaandClaude Opus 5.5 20f6c98ec5 feat(core): profiled heightfields, slice 1: periodicHills, mirroredRelief, flatField (L53); research R22
WorldAssemblySurfaceProfileV1 on the native SurfaceWorld recipe and plan; version 0 'natural' is omitted
from serialized identity, so the owner world is unchanged. periodicHills (seeded cosine hills, plan-time
grade <= 15 deg), mirroredRelief (cap mirrors the floor by lambda, clearance checked) and flatField share
one profile function for points, lattice classification and exact cosine-extrema intervals (0 interval
misses in brute-force audits). Style-override fixtures with planned passages. Cold whole view about 1.33 s
for each profile vs 1.74 s natural SW (Clang). Owner hashes identical to L52; fast/medium/full PASS.
Research R22: SurfaceWorld critical path to about 1 s.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016dhxM43dnWvUu2B5Ph1iG1
2026-10-25 01:49:11 +02:00

56 lines
1.7 KiB
Python

#!/usr/bin/env python3
"""Build the three named style-override inputs for the profiled heightfield slice."""
import argparse
import json
import os
from pathlib import Path
ROOT = Path(__file__).resolve().parents[4]
OWNER = ROOT / "Standalone/data/owner_world.json"
OUT_DEFAULT = Path(os.environ.get("VOXELFORGE_VERIFY_OUT", ROOT / "Saved/Linux/l53"))
PROFILES = {
"periodicHills": {
"version": 1,
"kind": "periodicHills",
"amplitude_x_m": 1.5,
"amplitude_y_m": 1.5,
"wavelength_x_m": 96.0,
"wavelength_y_m": 96.0,
"minimum_arena_clearance_m": 0.0,
},
"mirroredRelief": {
"version": 1,
"kind": "mirroredRelief",
"amplitude_x_m": 1.5,
"amplitude_y_m": 1.5,
"wavelength_x_m": 128.0,
"wavelength_y_m": 128.0,
"mirror_lambda": 0.875,
"minimum_arena_clearance_m": 8.0,
},
"flatField": {
"version": 1,
"kind": "flatField",
"minimum_arena_clearance_m": 0.0,
},
}
def main() -> None:
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("--out", type=Path, default=OUT_DEFAULT / "fixtures")
args = parser.parse_args()
args.out.mkdir(parents=True, exist_ok=True)
base = json.loads(OWNER.read_text(encoding="utf-8"))
for name, override in PROFILES.items():
fixture = dict(base)
fixture["surface_profile_override"] = override
path = args.out / f"style-override-profile-{name}.json"
path.write_text(json.dumps(fixture, indent=2) + "\n", encoding="utf-8")
print(f"[L53ProfileFixture] name={path.stem} profile={name} path={path} status=PASS")
if __name__ == "__main__":
main()