Skip to content

Rebuild a Street Problem in 3D

Category Creative & Real-World AI Builds
Status ๐ŸŸก Partially completed
Repo nextwork-rebuild-a-street-problem-in-3d
Original NextWork guide nextwork.ai

Learning project

Practice work following a NextWork guide, separate from my production projects.

๐Ÿ“š NextWork learning project. This is a practice project I built while working through NextWork's Rebuild a Street Problem in 3D guide. It is part of my Learning portfolio and is fully separate from my production projects.

Category: Learning โ€บ Creative & Real-World AI Builds
Status: ๐ŸŸก Partially completed

Overview

One precise-looking number from a phone photo usually overstates what the photo shows. This build replaces guesses with ranges whose bounds are tied to specific photos and assumptions, and a confidence rating. A rendered street with a hidden true size makes it possible to check whether the ranges are honest, which a real pothole never allows.

Summary

Everything ran on a synthetic street. Six rendered "photos" of a pothole with a hidden known size (620 ร— 410 ร— 55 mm), all taken from the footpath with the 30 cm ruler kept off the carriageway, stand in for iPhone photos. The single-value baseline (420/219/40 mm) was audited into ranges (470โ€“720 / 340โ€“670 / 20โ€“100 mm, confidence Low) by measuring against the ruler, allowing for uncertainty in the observer's distance. My own brief builder (rewritten 3 Dec) shows the six-photo contact sheet. Its Three.js sketch is drawn at the range midpoints and redraws when the depth range changes. The three wheel drawings use plain geometry: car and bicycle wheels drop about 18% of their radius into the hole, an e-scooter wheel 56%. The one-page A4 landscape brief links Chicago's official CDOT/311 pothole page (not submitted) and retailer cost sources. Secret mission: a second reference (a 1 m rule) widened the width to 340โ€“1170 mm and kept confidence Low. All final ranges contain the hidden truth, while the baseline missed it by 27โ€“47%. Partial because there's no real street, iPhone or Claude Desktop.

The checks behind this are in docs/verification.txt.

Skills & tools

Three.js, Photogrammetry basics, Uncertainty communication, Playwright, Source verification, Civic reporting

What I built

  • tools/scene.html + tools/render_photos.mjs: a Three.js street (road, kerb, footpath, lane line, drain grate) with a pothole of known size and gravel in it. It renders the guide's six views from footpath eye height (photos/context-front.jpg โ€ฆ scale-reference.jpg) and the secret mission's scale-reference-2.jpg. The scene contains no people or number plates.
  • docs/01-baseline-false-precision.md: the single-value baseline (420 mm / 219 mm / 40 mm) and why it's false precision.
  • tools/measure.py โ†’ docs/02-audited-ranges.md, docs/measure-*.json, docs/measure-*-overlay.jpg: it segments the pothole and the reference and measures their pixel extents. The scale accounts for the pothole being farther away than the ruler (line-of-sight, using the observer's rough standing distances) and for the viewing angle across the street. The result is length 470โ€“720, width 340โ€“670 and depth 20โ€“100 mm (a visual bracket, not a measurement), with supporting photos, contradictions, missing scale and confidence Low.
  • docs/03-sources.md: the City of Chicago "Pothole in the Street" page on chicago.gov (CDOT via CHI 311, not submitted), car repair at $20โ€“$50 (Meineke), bicycle flat fix at $25 and scooter at $45โ€“$125 (E-Z Rider, Chicago), and injury cost marked "Not quantified from an authoritative local source", all accessed 2026-12-02.
  • Secret mission, docs/04-secret-mission.md โ†’ docs/evidence-brief-revised.pdf: the 1 m rule gives 570โ€“940 / 540โ€“1170 mm, so the length is kept, the width is widened and confidence stays Low. The ground-truth scoring table shows all final ranges contain the truth, while the baseline was 27โ€“47% off.
  • index.html (my own code, rewritten 3 Dec): a six-step brief builder (photos โ†’ where and who โ†’ size ranges โ†’ a Three.js sketch with an elliptical hole cut in the road, drawn at the midpoints โ†’ wheel drawings โ†’ costs with sources), a "Write the brief" button, and print CSS that leaves exactly the one-page brief. The wheel drop is how far a circle of typical radius sinks into a gap of the midpoint length, capped by the depth. It ignores speed and suspension, as the page says.
  • tools/run_brief.mjs โ†’ docs/evidence-brief-run.json: loads the six photos (contact sheet: 6), fills the values, checks the sketch status changes from "595 โ€ฆ 60 mm deep" to "90 mm deep" when the depth range is raised, reads the wheel drops (60 mm each: 19% / 18% / 56% of radius), writes the brief and saves docs/evidence-brief.pdf (1 page) plus screenshots.

How to run

# photos (needs Chrome + playwright-core):
node tools/render_photos.mjs; node tools/render_photos.mjs scale-reference-2
python tools/measure.py scale-reference      # needs numpy, scipy, pillow
python tools/measure.py scale-reference-2
node tools/run_brief.mjs docs/brief-values.json evidence-brief
node tools/run_brief.mjs docs/brief-values-revised.json evidence-brief-revised
# or just open index.html in a browser and load the six photos

Verification

I ran the verification command on 2026-12-03. The full output is in docs/verification.txt.

python3 -c "import json;a=json.load(open('docs/evidence-brief-run.json'));b=json.load(open('docs/evidence-brief-revised-run.json'));assert not a['errors'] and not b['errors'] and a['photos_in_contact_sheet']==6 and a['brief_thumbnails']==6;assert a['model_status_after'].startswith('Drawn at range midpoints: 595 mm long') and '90 mm deep' in a['model_status_when_depth_raised'];w={x['vehicle']:x for x in a['wheels']};assert w['scooter']['share_of_radius']>w['car']['share_of_radius'];assert a['report']['report-length']=='470 to 720 mm' and b['report']['report-width']=='340 to 1170 mm';m=json.load(open('docs/measure-scale-reference.json'));assert m['length_mm'][0]<=620<=m['length_mm'][1] and m['width_mm'][0]<=410<=m['width_mm'][1]" && pdfinfo docs/evidence-brief.pdf | grep -q 'Pages: *1' && pdfinfo docs/evidence-brief-revised.pdf | grep -q 'Pages: *1' && grep -q 'chicago.gov' docs/03-sources.md && test ! -e docs/step4-foundation.html && echo STREET OK

Notes

Chicago is only an example for the authority lookup: the street is synthetic, so nothing was reported. Because the build agent also built the scene, the observer distance assumptions and the depth bracket were set knowing the true size. The ground-truth scoring is therefore a check of the method's arithmetic, not a blind test.

Rewritten 3 Dec 2026: the earlier index.html was the guide's complete reference page, and docs/step4-foundation.html was its foundation page. Both are gone. The builder and its driver are now my own, and both briefs were regenerated.

What isn't done, and why

There's no real street defect, iPhone, AirDrop or Claude Desktop. The six photos are renders of a synthetic street. The planned Claude Code photo audit was replaced by a measurement script, because the local vision model (qwen2.5vl:3b) was OOM-killed on this shared box. PDFs came from headless Chrome rather than a Mac print dialog.


Original project: https://nextwork.ai/projects/4017b92b-66b3-4ab4-86f8-116faad9dc7d ยท Part of my NextWork Learning portfolio (hub).

Verification output

From docs/verification.txt:

$ python3 -c "import json;a=json.load(open('docs/evidence-brief-run.json'));b=json.load(open('docs/evidence-brief-revised-run.json'));assert not a['errors'] and not b['errors'] and a['photos_in_contact_sheet']==6 and a['brief_thumbnails']==6;assert a['model_status_after'].startswith('Drawn at range midpoints: 595 mm long') and '90 mm deep' in a['model_status_when_depth_raised'];w={x['vehicle']:x for x in a['wheels']};assert w['scooter']['share_of_radius']>w['car']['share_of_radius'];assert a['report']['report-length']=='470 to 720 mm' and b['report']['report-width']=='340 to 1170 mm';m=json.load(open('docs/measure-scale-reference.json'));assert m['length_mm'][0]<=620<=m['length_mm'][1] and m['width_mm'][0]<=410<=m['width_mm'][1]" && pdfinfo docs/evidence-brief.pdf | grep -q 'Pages: *1' && pdfinfo docs/evidence-brief-revised.pdf | grep -q 'Pages: *1' && grep -q 'chicago.gov' docs/03-sources.md && test ! -e docs/step4-foundation.html && echo STREET OK

STREET OK

[exit code 0]