/ concept-collection / qhull-wasm-demo
Sign in
concept-collection / qhull-wasm-demo
qhull-wasm-demo / README.md
43 lines · 1.8 KBPreviewCodeBlameHistoryRaw
1# qhull-wasm-demo
3Interactive demos and benchmarks for
4[qhull-wasm](https://github.com/magland/qhull-wasm) — [Qhull](http://www.qhull.org)
5compiled to WebAssembly for computing convex hulls and Delaunay triangulations
6in the browser.
8**Live:** https://concept-collection.github.io/qhull-wasm-demo/
10- **2D Triangulation** — Delaunay triangulation + convex hull of a point set;
11 click to add points, switch distributions, toggle circumcircles.
12- **3D Convex Hull** — triangulated hull of a 3D point cloud, rendered with
13 three.js (drag to rotate).
14- **Benchmarks** — times Delaunay triangulation in the browser, alongside a
15 `.m` script that runs identically in MATLAB, Octave, and
16 [numbl](https://numbl.org) (all triangulate via Qhull) for an apples-to-apples
17 desktop-vs-browser comparison. See [scripts/qhull_benchmark.m](scripts/qhull_benchmark.m):
19 ```
20 matlab -batch qhull_benchmark # MATLAB
21 octave qhull_benchmark.m # Octave
22 numbl run qhull_benchmark.m # numbl
23 ```
25 Reference desktop timings, Delaunay in ms (one Linux laptop — hardware-dependent):
27 | N | numbl 2D | numbl 3D | Octave 2D | Octave 3D | MATLAB 2D | MATLAB 3D |
28 |--------|---------:|---------:|----------:|----------:|----------:|----------:|
29 | 1,000 | 4.1 | 16.5 | 4.5 | 10.1 | 21.1 | 21.3 |
30 | 5,000 | 18.6 | 54.3 | 12.2 | 61.3 | 28.6 | 185.5 |
31 | 20,000 | 65.5 | 287.3 | 55.6 | 336.3 | 179.9 | 624.2 |
32 | 50,000 | 154.7 | 757.0 | 174.9 | 973.9 | 373.8 | 1703.9 |
34## Develop
36```bash
37npm install
38npm run dev # local dev server
39npm run build # production build -> dist/
40```
42Deployed to GitHub Pages by [.github/workflows/deploy.yml](.github/workflows/deploy.yml)
43on push to `main`.
moveopenescclose