a65b3e2Interactive surfacefun mesh refinement (numbl project)Jeremy Magland 1# Interactive surface mesh refinement
3Runs in your browser through [numbl](https://numbl.org) — no install.
5## ▶ [Open `refine_demo.m`](refine_demo.m) and click **Run**
7A cubed-sphere [surfacefun](https://github.com/danfortunato/surfacefun) mesh
8appears in the figure. Drag the **Refinement level** slider: the page sends the
9level back to the script, which refines the mesh with surfacefun and returns the
10new patches — the surface re-renders in place (drag to rotate, scroll to zoom).
12It's a live demo of numbl's `uihtml` two-way bridge: data flows script → figure,
13and the slider drives work back in the interpreter, figure → script.
15## How it works
8130665Split low-level plumbing into mesh_refiner.mJeremy Magland 17- [`refine_demo.m`](refine_demo.m) — the whole user-facing script: load
18 surfacefun, build a mesh, and hand it to `mesh_refiner`.
19- `mesh_refiner.m` — the plumbing: opens the figure, sends the mesh to it, and
20 refines the mesh on each slider change (the script → figure → script wiring).
a65b3e2Interactive surfacefun mesh refinement (numbl project)Jeremy Magland 21- `app/` — a small React/three.js app (built to a single HTML file) that renders
22 the surface with numbl's own surface renderer and hosts the slider.
24On every push to `main`, the
25[deploy workflow](.github/workflows/deploy.yml) builds the app, bundles the
26project with the numbl browser IDE, and publishes it to GitHub Pages.