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— loads surfacefun viamip, builds the base mesh, sends it to the figure, and refines on demand in itsHTMLEventReceivedFcncallback.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.