Skip to content

FrancescoGradi/L-System-Trees

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

L-System-Trees

An interactive garden where you can create your based L-System trees.

This software provides a 3D real time rendering of a garden, where put trees or bushes. It is based on Lindenmayer System, that consists of an alphabet simbols with some production rules. Algorithm starts with an axiom and expands rules iterations-times. The generated strings are converted into geometric structures, branches in our case. The tree generated has a fractal branch scheme.

It was written in Javascript with Three.js framework, which is based on WebGL API.

How to install

Download code and run index.html with a browser. In Chrome local mode, make sure to turn on the -allow-file-access-from-files flag or run it with local server (best solution) to load textures.

It is recommended to have dedicated GPU to render more trees. Code tested with Firefox and Chrome.

How to make it work

In this demo, you can:

  • Choose a ground point with mouse click;
  • Select the complete tree Grammar, in particular the axiom and two production rules.
  • Complete tree parameters, like branch length, branch radius, branch angle and so on.
  • Choose some fancy tree features, like season and different textures.
  • Render with the button.
  • Eventually, you can use 5 preset different type trees.

References

[1] Przemyslaw Prusinkiewicz and Aristid Lindenmayer, The Algorithmic Beauty of Plants, 2004.

[2] https://en.wikipedia.org/wiki/L-system

[3] http://www.carl-olsson.com/project/l-system/

Releases

No releases published

Packages

No packages published