An implementation of parametric L-systems for the Fractals course at TU Wien.
On Windows, MacOS, and ChromeOS, you can check it out directly at jolifantobambla.github.io/parametric-l-systems in Google Chrome (from version 94 to 114) thanks to the WebGPU origin trial.
Install build dependencies:
Then, within the project root directory, run
wasm-pack build --target web
Install requirements:
- Install a browser that supports WebGPU, and if necessary, enable WebGPU in the browser (e.g., on Linux: Chromium with flags
--enable-vulkan --enable-unsafe-webgpu
). - Install a HTTP server (e.g., Python 3 and its http.server module, or the NodeJS module http-server)
Then, within the project root directory
- Serve the project using an HTTP server (e.g.,
python -m http.server
, orhttp-server
) - Navigate to the project's
index.html
using the browser with WebGPU enabled (e.g.,localhost:8000
when using the Python HTTP server defaults, orlocalhost:8080
when usinghttp-server
's defaults)
The documentation can be found here, or directly under the Documentation
tab on the website (either served locally, or at jolifantobambla.github.io/parametric-l-systems)
The following test scenes can be found here:
Name | Description | Source |
---|---|---|
abop-fig-1-19.json | A 3D Hilbert curve with 64 point light sources. | Algorithmic beaty of plants, Fig. 1.19 |
abop-fig-2-6.json | Honda's tree model. | Algorithmic beaty of plants, Fig. 2.6d |
forest-abop-fig-2-6.json | All four trees shown in Fig. 2.6 in the book. | Algorithmic beaty of plants, Fig. 2.6 |
abop-fig-2-7.json | Aono and Kunii's tree model. | Algorithmic beaty of plants, Fig. 2.7d |
forest-abop-fig-2-7.json | All four trees shown in Fig. 2.7 in the book. | Algorithmic beaty of plants, Fig. 2.7 |
tree-prusinkiewicz.json | A tree model as shown in Fig. 8g in the paper. | L-systems: from the Theory to Visual Models of Plants, Fig. 8g |
growing-tree-prusinkiewicz.json | Four instances of the tree model as shown in Fig. 8g in the paper with different numbers of iterations. | L-systems: from the Theory to Visual Models of Plants, Fig. 8g |
tree-prusinkiewicz-using-primitives.json | A tree adapted from Fig. 8 in the paper s.t. it has some leaves. | L-systems: from the Theory to Visual Models of Plants, Fig. 8 |
random-forest-prusinkiewicz-using-primitives.json | Nine trees adapted from Fig. 8 in the paper s.t. it they have some leaves and use some randomness in their productions, i.e., the trees will look different every time the scene is rendered. | L-systems: from the Theory to Visual Models of Plants, Fig. 8 |
tree-prusinkiewicz-with-floor.json | A tree model as shown in Fig. 8g in the paper and a large quad as floor. | L-systems: from the Theory to Visual Models of Plants, Fig. 8 |
tree-stochastic.json | A tree adapted from Fig. 8 in the paper s.t. it has uses some randomness in its productions. | L-systems: from the Theory to Visual Models of Plants, Fig. 8 |