Skip to content

feat(examples): show how the reprojection explainer measures error - #702

Merged
kylebarron merged 5 commits into
developmentseed:mainfrom
willjnz:explain-reprojection-more
Oct 13, 2026
Merged

kylebarron merged 5 commits into
developmentseed:mainfrom
willjnz:explain-reprojection-more

Conversation

@willjnz

@willjnz willjnz commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Note

This description was written by Claude (Claude Code) on behalf of @kylebarron, not by @kylebarron or @willjnz.

Add a step to the reprojection explainer that shows how the mesh error is measured, and show each triangle's error while the mesh refines.

  • Measure the error (new step 4) picks up where the two triangles land. It shows the test points of both triangles (currently each triangle's centroid and edge midpoints): where the GPU draws each point (red, its corners' exact positions blended linearly) and where it belongs (green, its exact reprojection), labelled with the error in input pixels. The worst, 261 px at the center of the image, gets the largest label.
  • Refine the mesh tints each triangle red by its error, read from RasterReprojector's priority queue. The tint fades as the error shrinks (on a log scale), and a triangle below the threshold has none. Pausing on a split, or watching the slow first splits, shows the split triangle's test points.
  • The last slide links to Volodymyr Agafonkin's site.

recordRefinement now also records the test points of the seed triangles (seedSamples) and of each split triangle (split.samples), and every triangle's score after each step (seedScores, scores). measureTriangle reproduces the library's error metric, and the scores come from its private _errors and _queueIndices. The explainer now has 7 steps (jump keys 1–7), and the README describes the new one.

🤖 Written by Claude Code

@willjnz willjnz changed the title Explain reprojection more feat(examples): Explain reprojection more Oct 13, 2026
@github-actions github-actions Bot added the feat label Oct 13, 2026
kylebarron and others added 2 commits October 13, 2026 09:44
- Restore the original slide text and the first attempt's error display,
  and show the image outline from the first slide again.
- Drop the edge-flip slide and its flip detection: the explainer doesn't
  need to show every part of the algorithm.
- Start the measure slide where the first attempt ends. Only the worst
  error's label is full size, and every label sits clear of its dot.
- Fade the error tint as the mesh converges (squared log scale, clear at
  the final tolerance), instead of tinting relative to the current worst.
- Drop the added captions.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kylebarron

Copy link
Copy Markdown
Member

Thanks! I really like the idea of using the visual reprojection demo as a way to manage intractable or hard to understand problems like the antimeridian.

I did some iterations on this with Claude. In particular, I reverted a lot of the text to the original text, since that was text I wrote by hand, and I didn't want it to be converted to AI text.

I also lessened the red tints over the iterations, and I took out the slide about meeting the delaunay condition. For now I don't feel like that fits in anywhere cleanly, and it's more of an underlying implementation detail than the rest of the reprojection handling.

@kylebarron

Copy link
Copy Markdown
Member

I also rewrote the PR description so that the commit message would match it, I hope that's ok 🙏

@kylebarron
kylebarron merged commit 1efebd8 into developmentseed:main Oct 13, 2026
4 checks passed
@kylebarron kylebarron changed the title feat(examples): Explain reprojection more feat(examples): show how the reprojection explainer measures error Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants