concept-collection / surfacefun-interactive
Go to fileHistoryFork
Jeremy Magland "Claude PR Assistant workflow" 8f2802f 3 Commits
.github"Claude PR Assistant workflow"
appInteractive surfacefun mesh refinement (numbl project)
.gitignoreInteractive surfacefun mesh refinement (numbl project)
.numblignoreInteractive surfacefun mesh refinement (numbl project)
mesh_refiner.mSplit low-level plumbing into mesh_refiner.m
numbl-project.jsonInteractive surfacefun mesh refinement (numbl project)
README.mdSplit low-level plumbing into mesh_refiner.m
refine_demo.mSplit low-level plumbing into mesh_refiner.m

Interactive surface mesh refinement#

Runs in your browser through numbl — no install.

Open refine_demo.m and click Run#

A cubed-sphere surfacefun mesh appears in the figure. Drag the Refinement level slider: the page sends the level back to the script, which refines the mesh with surfacefun and returns the new patches — the surface re-renders in place (drag to rotate, scroll to zoom).

It's a live demo of numbl's uihtml two-way bridge: data flows script → figure, and the slider drives work back in the interpreter, figure → script.

How it works#

  • refine_demo.m — the whole user-facing script: load surfacefun, build a mesh, and hand it to mesh_refiner.
  • mesh_refiner.m — the plumbing: opens the figure, sends the mesh to it, and refines the mesh on each slider change (the script → figure → script wiring).
  • app/ — a small React/three.js app (built to a single HTML file) that renders the surface with numbl's own surface renderer and hosts the slider.

On every push to main, the deploy workflow builds the app, bundles the project with the numbl browser IDE, and publishes it to GitHub Pages.