Skip to content

Walls block light (gap 16) - #5

Merged
Erry91 merged 1 commit into
mainfrom
feat/obstruction
Oct 21, 2026
Merged

Erry91 merged 1 commit into
mainfrom
feat/obstruction

Conversation

@Erry91

@Erry91 Erry91 commented Oct 21, 2026

Copy link
Copy Markdown
Owner

What this changes

Walls block light (gap 16, the alpha blocker that could make a corridor around a corner look lit).

  • luxpath-geom: Wall is an opaque vertical panel on a plan segment, between two heights.
    • Wall::blocks(from, to) tests a sight line against it.
    • Points and luminaires within 1 mm of a wall's face are not hidden by it.
    • Grazing a wall's end counts as blocked.
  • luxpath-calc: illuminance_with_walls; illuminance keeps its signature (no walls).
  • Scenes:
    • [[wall]] with a path polyline, height_m and an optional floor_m; doorways are gaps.
    • Documented in docs/scene-format.md.
  • luxpath check states how many wall pieces block light, and that furniture and doors do not.
  • Examples now have their walls. The corridor's route minimum drops from 1.45 lx to 0.60 lx (max/min from 2.0:1 to 4.8:1) once light no longer passes through the corner.
  • Gap 16 narrowed to "luminaires are points"; it is no longer an alpha blocker.

How you verified it

  • cargo xtask ci, natively and in the local Linux container, including timing:

    • without walls, 55 ms;
    • with 36 walls, about 90 ms (new budget 500 ms).

    Merged on the local checks (hosted CI unavailable).

  • Hand-checked cases:

    • behind a wall: 0 lx;
    • in front of it: the unobstructed 1000 · 2.5 / 7.25^1.5;
    • over a low wall, crossed at z = 1.25 m: blocked only when the wall reaches that height.
  • Watched it fail: with wall blocking disabled, the calc and rules tests go red.

Life safety (AGENTS.md §2)

  • Removes a known wrong pass; the remaining approximations (point luminaires, no furniture) are printed as assumptions

Never panic (AGENTS.md §3)

  • NaN, parallel and degenerate sight lines tested; wall heights validated

Provenance (AGENTS.md §1)

  • Nothing from a standard

Records

  • parity/features.toml, docs/scene-format.md, docs/gaps.md, docs/status.md, ROADMAP.md log

[[wall]] polylines with a height in scenes; a luminaire whose sight line
to a point crosses a wall piece gives that point nothing. The corridor
example's route minimum drops from 1.45 to 0.60 lx. 100 luminaires x
10,000 points x 36 walls in ~90 ms.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Erry91
Erry91 merged commit 455db32 into main Oct 21, 2026
@Erry91
Erry91 deleted the feat/obstruction branch October 21, 2026 10:45
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.

1 participant