31eb018Add interactive vector field demo with arrow scale sliderclaude[bot] 1# Interactive surfacefun demos
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).
31eb018Add interactive vector field demo with arrow scale sliderclaude[bot] 12## ▶ [Open `vector_field_demo.m`](vector_field_demo.m) and click **Run**
14A tangent vector field (arrows) is displayed on a sphere. Use the **Arrow
15scale** slider to make the arrows larger or smaller — scaling updates instantly
16in the browser with no round-trip to the script. The field is the tangential
17projection of a constant vector onto the surface, giving a smooth "wind" pattern.
19## How it works
31eb018Add interactive vector field demo with arrow scale sliderclaude[bot] 21- [`refine_demo.m`](refine_demo.m) — builds a mesh and hands it to `mesh_refiner`
22- [`vector_field_demo.m`](vector_field_demo.m) — builds a mesh and vector field; hands them to `vector_field_viewer`
23- `mesh_refiner.m` / `vector_field_viewer.m` — open the figure, send data; `mesh_refiner` also handles slider callbacks
a65b3e2Interactive surfacefun mesh refinement (numbl project)Jeremy Magland 24- `app/` — a small React/three.js app (built to a single HTML file) that renders
31eb018Add interactive vector field demo with arrow scale sliderclaude[bot] 25 the surface and hosts the controls
27The figure app detects the data type (`data.type === 'vectorfield'` vs. plain
28mesh data) and switches between the refinement panel and the arrow-scale panel.
30On every push to `main`, the
31[deploy workflow](.github/workflows/deploy.yml) builds the app, bundles the
32project with the numbl browser IDE, and publishes it to GitHub Pages.