1# Concept Collection
3This is a collection of random small projects and demos, most of which can be run entirely in the web browser (client side). Many of them are centered around the [numbl project](https://numbl.org).
5## MATLAB syntax in Jupyter, all in the browser
7Here's a proof of concept for running MATLAB syntax in Jupyter entirely client side (no kernel, no server). It uses numbl and JupyterLite.
9- **[jupyterlite-numbl-kernel](https://github.com/concept-collection/jupyterlite-numbl-kernel)** · [live](https://concept-collection.github.io/jupyterlite-numbl-kernel/)
11## Interactive MCMC samplers
13Here are a couple of demonstrations of MCMC samplers that you can watch run. They use numbl (MATLAB syntax in the browser) to do the sampling client-side in the browser. In the case of WALNUTS (the within-orbit adaptive leapfrog No-U-Turn Sampler), we use the exact MATLAB code that is a companion to the paper.
15- **[hitandrun-interactive](https://github.com/concept-collection/hitandrun-interactive)** · [live](https://concept-collection.github.io/hitandrun-interactive/#figure/sampler)
16- **[walnuts-interactive](https://github.com/concept-collection/walnuts-interactive)** · [live](https://concept-collection.github.io/walnuts-interactive/#figure/sampler)
18## Barycentric rational interpolation
20An interactive companion to Floater and Hormann's family of rational interpolants, which have no poles anywhere on the real line and reach approximation order *h*<sup>*d*+1</sup> however the interpolation points are distributed. The method is a MATLAB-syntax script you edit in the page; swap in weights that do not alternate in sign and watch the poles appear.
22- **[barycentric-rational](https://github.com/concept-collection/barycentric-rational)** · [live](https://concept-collection.github.io/barycentric-rational/)
24## Embedding & hosting numbl projects
26Here are a couple of projects that let you embed or host your own numbl/MATLAB projects entirely client side.
28- **[numbl-embed-example](https://github.com/concept-collection/numbl-embed-example)** · [live](https://concept-collection.github.io/numbl-embed-example/)
29- **[numbl-project-example](https://github.com/concept-collection/numbl-project-example)** · [live](https://concept-collection.github.io/numbl-project-example/)
31## VS Code–style IDEs
33Here are a couple of VS Code–style IDEs that run entirely in the browser: one for MATLAB syntax (via numbl), one for Stan.
35- **[numbl-web-ide](https://github.com/concept-collection/numbl-web-ide)** · [live](https://concept-collection.github.io/numbl-web-ide/)
36- **[stan-web-ide](https://github.com/concept-collection/stan-web-ide)** · [live](https://concept-collection.github.io/stan-web-ide/)
38## surfacefun examples
40[Surfacefun](https://surfacefun.readthedocs.io/en/latest/) is a MATLAB package for computing with functions defined on surfaces and solving PDEs on them to high order. Here are some examples that run surfacefun via numbl in the browser.
42- **[numbl-surfacefun-intro](https://github.com/concept-collection/numbl-surfacefun-intro)** · [live](https://concept-collection.github.io/numbl-surfacefun-intro/)
43- **[surfacefun-interactive](https://github.com/concept-collection/surfacefun-interactive)** · [live](https://concept-collection.github.io/surfacefun-interactive/)
44- **[mesh-pde-solver](https://github.com/concept-collection/mesh-pde-solver)** · [live](https://concept-collection.github.io/mesh-pde-solver/)
46## chunkie examples
48[Chunkie](https://chunkie.readthedocs.io/en/latest/) is a MATLAB package for solving boundary integral equations in two dimensions. Here are some examples that run chunkie via numbl in the browser.
50- **[numbl-chunkie](https://github.com/concept-collection/numbl-chunkie)** · [live](https://concept-collection.github.io/numbl-chunkie/)
52## MRI pulse sequences
54[Pulseq](https://pulseq.github.io/) is an open framework for defining MRI pulse sequences. Here you can write pulseq sequences in MATLAB syntax and run them in the browser via numbl to generate a `.seq` file, upload and interactively explore an existing one, or simulate one on a digital phantom to see the raw k-space it acquires.
56- **[seqlab](https://github.com/concept-collection/seqlab)** · [live](https://concept-collection.github.io/seqlab/)
57- **[mri-scanner](https://github.com/concept-collection/mri-scanner)** · [live](https://concept-collection.github.io/mri-scanner/)
59## Spherical harmonics on the GPU
61Here are spherical harmonic transforms reimplemented from scratch as WebGPU compute shaders, modeled on [SHTNS](https://nschaeff.bitbucket.io/shtns/), together with a live reaction-diffusion solver built on them: Turing patterns forming on a sphere, with diffusion handled implicitly in spectral space where the Laplace-Beltrami operator is diagonal. turing-surface extends the solver from the round sphere to closed surfaces given by spherical-harmonic embeddings, and turing-surface-cache narrows it to a discrete menu of parameter choices whose solutions at a chosen end time are shared between all visitors through a cloud cache.
63- **[shtns-webgpu](https://github.com/concept-collection/shtns-webgpu)** · [live](https://concept-collection.github.io/shtns-webgpu/)
64- **[turing-sphere](https://github.com/concept-collection/turing-sphere)** · [live](https://concept-collection.github.io/turing-sphere/)
65- **[turing-surface](https://github.com/concept-collection/turing-surface)** · [live](https://concept-collection.github.io/turing-surface/)
66- **[turing-surface-cache](https://github.com/concept-collection/turing-surface-cache)** · [live](https://concept-collection.github.io/turing-surface-cache/)
68## MATLAB scripts on WebGPU
70A sandbox that compiles MATLAB-syntax scripts to fused WebGPU compute kernels and times them with the script's own `tic`/`toc` — paste the same script into real MATLAB to compare. Built on numbl's compiler front end.
72- **[math-webgpu-sandbox](https://github.com/concept-collection/math-webgpu-sandbox)** · [live](https://concept-collection.github.io/math-webgpu-sandbox/)
74## Matrix multiplication benchmark
76Here's a benchmark of matrix-matrix multiply (GEMM) in the browser across several implementations: a plain JavaScript loop, WebGPU, hand-written C compiled to WASM (SIMD and threads), and a real BLAS (libFLAME) compiled to WASM, with a native reference for comparison.
78- **[matmul-bench](https://github.com/concept-collection/matmul-bench)** · [live](https://concept-collection.github.io/matmul-bench/)
80## Lazy reading of remote HDF5 files
82Here's a demo of reading large remote HDF5 files, such as [NWB](https://www.nwb.org/) neurophysiology files, directly in the browser using HTTP range requests, with no full download and no backend. It shows the approach that [neurosift](https://neurosift.app/) uses to browse these files.
84- **[remote-hdf5-lazy-read](https://github.com/concept-collection/remote-hdf5-lazy-read)** · [live](https://concept-collection.github.io/remote-hdf5-lazy-read/)
86## Scientific data compression
88Here are a few projects on compressing scientific data: a step-by-step visualizer for the [Asymmetric Numeral Systems (ANS)](https://ieeexplore.ieee.org/abstract/document/7170048) entropy-coding algorithm, an interactive study of how compressible quantized noisy time series are, a framework for benchmarking compression algorithms on scientific data arrays, and compression benchmarks for electrophysiology recordings.
90- **[ans-visualizer](https://github.com/concept-collection/ans-visualizer)** · [live](https://concept-collection.github.io/ans-visualizer/)
91- **[timeseries-compressibility](https://github.com/concept-collection/timeseries-compressibility)** · [live](https://concept-collection.github.io/timeseries-compressibility/)
92- **[benchcompress](https://github.com/concept-collection/benchcompress)** · [results](https://concept-collection.github.io/benchcompress/) · [paper (WIP)](https://concept-collection.github.io/benchcompress/paper)
93- **[ephys_compression_tests](https://github.com/concept-collection/ephys_compression_tests)** · [results](https://concept-collection.github.io/ephys_compression_tests/)
95## Speech to text in the browser
97Here's a dictation notepad that transcribes as you speak and never sends your audio anywhere: Whisper and Moonshine run locally via [transformers.js](https://github.com/huggingface/transformers.js), on WebGPU where it's available. The transcript accumulates into a document you can edit and copy.
99- **[voicenote](https://github.com/concept-collection/voicenote)** · [live](https://concept-collection.github.io/voicenote/)
101## Other projects
103### numbl platform: templates & tooling
105Utilities and starting points for building your own
106[numbl](https://numbl.org) projects.
108- **[numbl-figure-viewer](https://github.com/concept-collection/numbl-figure-viewer)**
109 ([live](https://concept-collection.github.io/numbl-figure-viewer/)).
110 Open and explore a figure exported from numbl, including its underlying data.
112### Peer-to-peer shared state
114- **[commonroom](https://github.com/concept-collection/commonroom)**
115 ([live](https://concept-collection.github.io/commonroom/)).
116 Serverless group video calls: pick a room name, share the link, and everyone
117 in the room is connected over a full WebRTC mesh (up to 8 people), with
118 room-wide shared settings.
119- **[commonroom-recorder](https://github.com/concept-collection/commonroom-recorder)**
120 ([run with npx](https://concept-collection.github.io/commonroom-recorder/)).
121 Command-line bot that joins a commonroom call as a visible muted participant
122 and records each participant's audio (plus the chat) to files for
123 transcription.
124- **[commoncall](https://github.com/concept-collection/commoncall)**
125 ([live](https://concept-collection.github.io/commoncall/)).
126 Serverless video calls: enter an ID, see who else is on the page, and call
127 them — call setup rides over nostr relays, media flows peer-to-peer via WebRTC.
128- **[hitandrun-commonview](https://github.com/concept-collection/hitandrun-commonview)**
129 ([live](https://concept-collection.github.io/hitandrun-commonview/)).
130 The hit-and-run figure with a single live view shared by all visitors over a
131 WebRTC mesh; one peer runs the sampler via numbl and broadcasts to the rest.
132- **[commonview](https://github.com/concept-collection/commonview)**
133 ([live](https://concept-collection.github.io/commonview/)).
134 A minimal peer-to-peer page where every visitor shares one state (a counter):
135 nostr discovery, a WebRTC mesh, and a central-peer authority. The basis for
136 hitandrun-commonview.
138### Geometry, meshing & PDE solvers
140- **[mesh-studio](https://github.com/concept-collection/mesh-studio)**
141 ([live](https://concept-collection.github.io/mesh-studio/)).
142 Build CAD primitives or import STEP/IGES with
143 [OpenCASCADE.js](https://ocjs.org/), then inspect them in 3D — including each
144 face's true NURBS surface (polynomials on faces), not just its triangulation.
145- **[mesh-converter](https://github.com/concept-collection/mesh-converter)**
146 ([live](https://concept-collection.github.io/mesh-converter/)).
147 Convert meshes between 19 formats (PLY, OBJ, STL, VTK, Gmsh, XDMF, …) with
148 [meshio](https://github.com/nschloe/meshio) running in-browser on Pyodide;
149 inspect meshes in 3D and see what a lossy export would drop.
150- **[qhull-wasm-demo](https://github.com/concept-collection/qhull-wasm-demo)**
151 ([live](https://concept-collection.github.io/qhull-wasm-demo/)).
152 Demos and benchmarks for [qhull-wasm](https://github.com/magland/qhull-wasm),
153 which compiles [Qhull](http://www.qhull.org) to WebAssembly. Includes 2-D
154 Delaunay triangulation, 3-D convex hull, and a Delaunay benchmark with
155 matching scripts for MATLAB, Octave, and numbl.
156- **[numbl-distmesh](https://github.com/concept-collection/numbl-distmesh)**
157 ([live](https://concept-collection.github.io/numbl-distmesh/)).
158 Every example from Persson and Strang's
159 [DistMesh](https://github.com/popersson/DistMesh), meshing 2-D regions and
160 surfaces from signed distance functions.
161- **[abc-step-1000](https://github.com/concept-collection/abc-step-1000)**
162 ([live](https://concept-collection.github.io/abc-step-1000/)).
163 The first 1000 STEP files from the
164 [ABC dataset](https://deep-geometry.github.io/abc-dataset/) of CAD models
165 (Koch et al., CVPR 2019), served gzip-compressed with a JSON manifest for
166 direct download.
168### Neurophysiology data & remote access
170- **[dandiset_000986](https://github.com/concept-collection/dandiset_000986)**
171 ([visualizations](https://concept-collection.github.io/dandiset_000986/)).
172 Reproducible figures and visualizations for
173 [DANDI Dandiset 000986](https://dandiarchive.org/dandiset/000986), a set of
174 mouse auditory cortex recordings.
176### Physics & quantum systems
178- **[mri-spins](https://github.com/concept-collection/mri-spins)**
179 ([live](https://concept-collection.github.io/mri-spins/)).
180 Interactive MRI physics: a 3D sample of spins evolving under the Bloch
181 equations, with RF pulses, gradients, relaxation, a live signal trace, and a
182 spoiled gradient echo sequence with scanner-like gradient sounds.
183- **[numbl-quantum-optics](https://github.com/concept-collection/numbl-quantum-optics)**
184 ([live](https://concept-collection.github.io/numbl-quantum-optics/)).
185 Runnable scripts accompanying the article "Quantum optics in MATLAB"
186 ([arXiv:2309.14354](https://arxiv.org/abs/2309.14354)), covering quantum
187 states, operators, and dynamics.
188- **[numbl-open-quantum-systems](https://github.com/concept-collection/numbl-open-quantum-systems)**
189 ([live](https://concept-collection.github.io/numbl-open-quantum-systems/)).
190 Code from "Coding closed and open quantum systems in MATLAB"
191 ([arXiv:1911.04906](https://arxiv.org/abs/1911.04906)), including Ising
192 dynamics, cavity-QED phase transitions, and Lindblad and non-Markovian
193 evolution.
195### Image processing
197- **[numbl-image-filter](https://github.com/concept-collection/numbl-image-filter)**
198 ([live](https://concept-collection.github.io/numbl-image-filter/)).
199 Upload an image, write a MATLAB-syntax filter, and run it on the image in the
200 browser.
202### Number theory & visual math
204- **[finite-field-visualizer](https://github.com/concept-collection/finite-field-visualizer)**
205 ([live](https://concept-collection.github.io/finite-field-visualizer/)).
206 Color-coded multiplication tables over finite (prime) fields. Step through the
207 primes to watch the structure change.
208- **[gcd-visualizer](https://github.com/concept-collection/gcd-visualizer)**
209 ([live](https://concept-collection.github.io/gcd-visualizer/)).
210 A heatmap of the greatest common divisor of every pair (i, j), laid out as a
211 color-coded table.
212- **[random-points-in-disk](https://github.com/concept-collection/random-points-in-disk)**
213 ([live](https://concept-collection.github.io/random-points-in-disk/)).
214 How many random points does it take before a disk looks like a disk? Voxel-density
215 heatmaps of uniform random sampling, next to the 1/√μ noise prediction.