/generative-hyphae-3d

A generative algorithm modeling hyphae growth across any 3D mesh.

Primary LanguagePythonMIT LicenseMIT

Generative Hyphae Growth Algorithm

Creation and Inspiration

This algorithm was created by Shaan Appel with support from Shivam Parikh and Hatim Khan for CS 194-028 (Computational Design and Fabrication), taught by Jonathan Bachrach during Spring 2018 at UC Berkeley. Much of the inspiration for creating this algorithm is from the Inconvergent Blog by Anders Hoff.

Results

The algorithm produces stl files for 3D printing to an stlexport folder. It saves Blender files with keyframes autoset for creating animations to the blend folder. Example animations can be seen here:

Growth Simulation Video

Instructions for running

Installing Dependencies:

Before running the program, you must install Blender, CGAL, and all python libraries (tested and run with Python 3.6).

Install all python library dependencies:

pip install -r requirements.txt

Install Blender and set up command line usage for your device.

Install CGAL.

Running the program:

To run the full program:

python grow_hyphae.py

With Optional Arguments:

python grow_hyphae.py input_filename rand_seed num_samples
  • input_filename Specifies stl file to run algorithm on. WORKS BEST ON LOW POLY STL FILES
  • rand_seed Integer giving random seed for repeatability
  • num_samples Specifies number of samples to connect with generative tree. More samples results in more complex model. Simulations were run with 1000 - 3000 samples.