This repository contains
- ./convert-bxsf - a python package that allows conversion from a single bxsf file to a web-friendly json file.
- ./fermisurface-vis - the javascript package to visualise the json file.
import { FermiVisualiser } from "fermisurface-visualiser";
const data = await fetch("./path/to/your/data.json").then((r) => r.json());
// Grab a div where you want the plot:
const container = document.getElementById("plot");
// Create visualiser defaults to fermilevel.
const vis = new FermiVisualiser(container, data);
// update the plot
vis.update(newFermiEValue);npm install
npm run dev
# GOTO http://localhost:5173/
# The data.json inside public will be read.- These cleaved meshes are significantly reduced in size (1/10th the previous), maybe these could be cached and loaded from a backend (via some expensive pipeline), this also means that loading them from the visualisercache is a little faster...
-
Debouncing is a free feature that could be tuned to proportionally to the size of the data array.
- Alternative is a 'Go' button that does the recalculation only then...
- Some how offloading mesh calculation to a webworker through wasm (or even just a generic webworker) would be amazing but hard
- Low-resolution - could do the live updates, while the high resolution churns away in the background
- Crazy idea would be to have the highresolution mesh calculate on the backend and be able to be fetched'
-
Post process mesh optimization may make better meshes (at potentially little overhead.)
-
Possible future improvements:
- “Recalculate” button instead of live update
- Low-resolution preview that updates quickly, with full-res in background