An open API service indexing awesome lists of open source software.

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!

Awesome Lists containing this project

README

        

# [StochasticLatticeGen](https://zalo.github.io/StochasticLatticeGen/)







Generate mesh-bounded stochastic lattice structures in the browser!

[![Image](assets/image.png)](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)