Plots a convex hull around nodes with index ipart of tree intree
(intree can also simply be an Nx3 matrix of XYZ points).
Hull patch is offset by XYZ 3-tupel DD
and coloured with RGB 3-tupel color.
alpha sets the transparency of the patch (by default .2).
Option '-2d' restricts the hull patch to two dimensions.
HP is the handle to the graphical object.
Set options to 'none' to avoid graphical output.
Output hull is a structure containing in hull.XY(Z)
the coordinates and in hull.ch the indices to the convex hull
(see Matlab function “convhull”).
If the tree is 100% flat 3D convex hull doesn't work.
If selected nodes are two draws a straight line. If selected nodes are one plots a point.
Example 1:
convex hull around sub-tree of node #11
>> chull_tree (sample_tree, ...
find (sub_tree (sample_tree, 11)), [0 1 0]) ← RGB for green
Example 2:
2D convex hull around entire tree
>> chull_tree (sample2_tree, ...
[], [], [], 1, ‘-2d’) ← alpha value 1 for opaque
This work is licensed under a
Creative Commons Attribution-Noncommercial-Share Alike 3.0 License