https://github.com/zalo/stochasticlatticegen
Build Stochastic Lattice Structures in the browser!
https://github.com/zalo/stochasticlatticegen
cad field lattice stochastic
Last synced: 3 months ago
JSON representation
Build Stochastic Lattice Structures in the browser!
- Host: GitHub
- URL: https://github.com/zalo/stochasticlatticegen
- Owner: zalo
- License: mit
- Created: 2024-07-25T08:40:07.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-08-14T22:28:05.000Z (11 months ago)
- Last Synced: 2025-02-14T23:24:15.486Z (5 months ago)
- Topics: cad, field, lattice, stochastic
- Language: JavaScript
- Homepage: https://zalo.github.io/StochasticLatticeGen/
- Size: 4.94 MB
- Stars: 9
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# [StochasticLatticeGen](https://zalo.github.io/StochasticLatticeGen/)
Generate mesh-bounded stochastic lattice structures in the browser!
[](https://zalo.github.io/StochasticLatticeGen/)
TODO:
- Spawn the voronoi centers with variable density according to a density field (density check first, then interior check)
- Allow importing meshes and saving lattices
- Optionally Prune Disconnected Elements
- Allow List or Mesh Export
- Allow changing the Mesh Lattice Style (Swept Tets, Cubes, Spheres, Customizable width)
- Consider Implicit Meshing using Closest Point to Connections and Marching Cubes(?)# Building
This demo can either be run without building (in Chrome/Edge/Opera since raw three.js examples need [Import Maps](https://caniuse.com/import-maps)), or built with:
```
npm install
npm run build
```
After building, make sure to edit the index .html to point from `"./src/main.js"` to `"./build/main.js"`.# Dependencies
- [Voro3D](https://github.com/LukPopp0/voro3d) (Voronoi Cell Computation)
- [three.js](https://github.com/mrdoob/three.js/) (3D Rendering Engine)
- [three-mesh-bvh](https://github.com/gkjohnson/three-mesh-bvh) (Accelerated Raycasting and Closest Point Queries)
- [esbuild](https://github.com/evanw/esbuild/) (Bundler)
- [worker-with-import-map](https://github.com/kungfooman/worker-with-import-map/) (Hack to allow Import Maps in Workers)