Create a fractal tree over a surface discretized by triangles
Project description
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 fractal_tree.tree import FractalTree3D
from fractal_tree.mesh import Mesh
from fractal_tree.parameters import Parameters
param = Parameters()
mesh = Mesh(param.meshfile)
branches, nodes = FractalTree3D(mesh, param)
If you have questions you can contact me at francisco.sahli at gmail.com
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for fractal_tree-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4836109338a4b014ad6f0bd808a509fbc8b6dc2e4abef0196fc84e63c2f7d77e |
|
MD5 | 4c89c575e791a6124219864ab842d158 |
|
BLAKE2b-256 | 799ac1a645c1ddbda442991a0388b1c6178a3c36e86acb2b91715d462e02bd7c |