I wanted to confirm exactly when the red outline switches on. The area figures and the route check use the same overlap test, so a mistake at the boundary would show up in those numbers too.
In a 300 × 300 cm room the desk (105 × 50) stays at (20, 20) and only the wardrobe moves. The desk's right edge is at x = 125, so a wardrobe starting at 125 touches it, at 124 overlaps it by 1 cm, and at 126 sits 1 cm away. Touching top to bottom, meeting at a corner and a wardrobe turned 90° make eight placements in all.
What counts as overlapping
Two pieces overlap only if they share some width and some depth. Edges lying on the same line just touch, and the outline stays off. The overlap area is the shared width times the shared depth.
The eight results
All eight came out right (8/8). The three touching placements show no overlap area. A 1 cm overlap covers 50 cm² when the pieces meet side by side and 100 cm² when they meet top to bottom. The strip is 1 cm thick either way; it runs along the desk's 50 cm depth in the first case and the wardrobe's 100 cm width in the second.
The old planner already handled this correctly. Its overlap formula, copied as it was, also got all eight right. What changed is the area figure: the old version added overlapping parts twice. Experiment 004 covers that.
Things to keep in mind
- Height is ignored. A chair pushed under a desk shows as an overlap even though it fits fine.
- The planner's input fields take whole centimeters. A value like 0.5 cm only gets in through a JSON file.
- Furniture is drawn as the rectangle around its outer edge, so rounded corners and gaps between legs aren't included.
Data
| Placement | Wardrobe (x, y) w×d | Right answer | New | Overlap cm² answer / new | Gap cm answer / new | Old | Result |
|---|---|---|---|---|---|---|---|
| Edges touch (x) | Wardrobe (125, 20) 100×60 | no | no | 0 / 0 | 0 / 0 | no | PASS |
| 1 cm overlap (x) | Wardrobe (124, 20) 100×60 | overlap | overlap | 50 / 50 | 0 / 0 | overlap | PASS |
| 1 cm apart (x) | Wardrobe (126, 20) 100×60 | no | no | 0 / 0 | 1 / 1 | no | PASS |
| Edges touch (y) | Wardrobe (20, 70) 100×60 | no | no | 0 / 0 | 0 / 0 | no | PASS |
| 1 cm overlap (y) | Wardrobe (20, 69) 100×60 | overlap | overlap | 100 / 100 | 0 / 0 | overlap | PASS |
| Corners touch | Wardrobe (125, 70) 100×60 | no | no | 0 / 0 | 0 / 0 | no | PASS |
| Rotated wardrobe touches | Wardrobe (125, 20) 60×100 | no | no | 0 / 0 | 0 / 0 | no | PASS |
| Rotated wardrobe, 1 cm overlap | Wardrobe (124, 20) 60×100 | overlap | overlap | 50 / 50 | 0 / 0 | overlap | PASS |
Where the right answers came from. A separate Python program, not the planner's code, worked them out again. Overlap was checked by comparing the horizontal and vertical ranges one at a time, and the floor the two pieces cover was counted cell by cell on a 1 cm grid. Every coordinate is a whole centimeter, so the count is exact.
Open in the planner
- Edges touch (x)
- 1 cm overlap (x)
- 1 cm apart (x)
- Edges touch (y)
- 1 cm overlap (y)
- Corners touch
- Rotated wardrobe touches
- Rotated wardrobe, 1 cm overlap
Running these three lines in the site's repository rebuilds the files. If the calculation code changes and these files aren't rebuilt, the site won't build, so the numbers on this page can't drift away from what the planner does.
node tools/run_experiments.mjs
python tools/verify_experiments.py