written by Friedrich Forstner 2008

Exports a tree intree as a set of cylinders in the .x3d html format. A viewer is necessary to use these files. Blender and BS Contact can for example load .x3d files. As opposed to POV-Ray (see “pov_tree”), these programs can only deal with polygons. As such, the output trees are sets of polygons. Object is offset by XYZ 3-tupel DD and coloured with RGB 3-tupel color (or Nx1 vector, attributing one value per node). ipart, a set of indices into intree, allows to use only a subset of nodes, for example only a sub-tree. If a viewer is installed and TREES runs on windows Matlab can call the viewer directly with the option '->'.


>> x3d_tree (sample_tree, [], [1 0 0], [], [], '-o ->')
←   RGB (1,0,0) tupel means RED
←   '-o' option adds spheres at node locations


Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License