/ concept-collection / surfacefun-interactive
Sign in
concept-collection / surfacefun-interactive
Go to fileHistoryFork
.githubInteractive surfacefun mesh refinement (numbl project)
appInteractive surfacefun mesh refinement (numbl project)
.gitignoreInteractive surfacefun mesh refinement (numbl project)
.numblignoreInteractive surfacefun mesh refinement (numbl project)
numbl-project.jsonInteractive surfacefun mesh refinement (numbl project)
README.mdInteractive surfacefun mesh refinement (numbl project)
refine_demo.mInteractive surfacefun mesh refinement (numbl project)

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 via mip, builds the base mesh, sends it to the figure, and refines on demand in its HTMLEventReceivedFcn callback.
  • 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.

moveopenescclose