Skip to content
Creates a 3D fractal tree on a given surface discretized by triangles.
Python
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Documentation
Branch3D.py
FractalTree.py
Mesh.py
ParaviewWriter.py
README.md
create_fractal_tree.py
license.txt
parameters.py
sphere.obj

README.md

fractal-tree

This code is to create a fractal tree over a surface discretized by triangles. It was developed to create a representation of the Purkinje network in the ventricles of the human heart.

Read the documentation in fractal-tree.readthedocs.org.

The details of the algorithm are presented in this article. If you are going to use this code, please cite:

Generating Purkinje networks in the human heart.
F. Sahli Costabal, D. Hurtado and E. Kuhl.
Journal of Biomechanics, doi:10.1016/j.jbiomech.2015.12.025

Pre-requisites:

  • Numpy
  • Scipy

You will need .obj mesh file to create the tree. A very nice software to manipulate the mesh and export it to .obj is MeshLab. Please check if the mesh has duplicated vertex or faces before running the code. Also the orientation of the normals can change your results, because the angles will be flipped. To visualize the output, the best alternative is Paraview.

To define the mesh file and the parameters of the tree to use, edit the parameters.py file and then run:

from FractalTree import *
from parameters import Parameters

param=Parameters()

branches, nodes = Fractal_Tree_3D(param)

If you have questions you can contact me at francisco.sahli at gmail.com

You can’t perform that action at this time.