Table of Contents
To change the taxonomy of the tree, a node
a
can be linked as a child of a node
b
. During this process the old parent of
a
is disconnected and the local
transformation of a
is adjusted to keep it
in the same global position.
This function works with apical and lateral children, using
different edge-types to connect a
to
a
. Apical links are represented by
successor edges and lateral links by branch edges.
This translates the start of a given shoot on the axis of the parent shoot. The shift on the parent shoot can be either, top, center, bottom or on the closest possible point on the axis. The last option does choose the point base on the parent axis not on the parent it self, therefore it is possible that the child is afterwards not attached to the parent (if it is on a position of the axis higher than the length of the parent).
For lateral children an additional shift in the direction of the child is added with the length of the radius of the parent. This is done to attach the child to the surface of the parent rather then the center.
The path between a shoot start
and a shoot
end
can be smoothed if the path between
them is of only successors and a maximum length of 10 shoots.
The process is replacing all shoots between start and end with
a single new shoot starting at the end of
start
and ending at the start of
end
. All lateral children of the replaced
shoots are added as children to the new shoot.
If end
is a direct child of
start
, start
and
end
are replaced by a new shoot starting at
the end of the parent of start
and ending
at the start of the parent of end
. This is
not supported for the root shoot as well as for tip-shoots
(with no children).
A new shoot can be created between a shoot
start
and a shoot end
ignoring any previous relation ship between them. The new
shoot is a lateral child of start
and
replaces the old parent of end
as the new
apical parent. The new shoot start at the end of
start
and ends at the start of
end
.
A shoot can be split into two shoots at a given ratio (0.0-1.0). All lateral children of the original shoot are distributed between the two new shoots based on their location on the axis of the original shoots, to ensure the closest possible connection.
This function replaces the diameter of a shoot with the average diameter of its parent and its successor. If only one of the two exists this diameter is used. If the parent connected as a branch (the node is a lateral child) the parent diameter is only considered half.
Set the local translation of a shoot to 0,0,0. Meaning to the end of the parent.
Turn a shoot into a turtle step to render it invisible and remove its volume and diameter without changing the trend or order of its children
It it possible to either remove a shoot alone without effecting its children, or to remove the whole sub-tree below it. If the shoot is remove alone its children are added as children to its parent. The remove with sub-tree works identically to pressing the delete key on the keyboard.