TreeOp¶
from acron.proctree import TreeOp
- class TreeOp¶
Bases:
Bases:
TypedReferenceCountOne step of a tree recipe, with the settings of its own (the species’ shape is the recipe’s
TreeParams).Every op draws from its own random stream, splitmix64(seed, op id), so editing one op leaves what the others grow alone; inside an op, a stem draws its children after itself (each stem from a stream of its own, keyed by its place in the tree), so a change near the tips does not reshuffle the whole crown.
Kinds and their settings (`set(name, value)`):
`T_trunk` – the trunk(s): base splits and the low fork from the params. No settings.
`T_weber_penn` – the branch levels by Weber & Penn: `first_level` (1), `last_level` (-1: the params’ last).
`T_space_colonization` – Runions et al. 2007: attraction points in the crown envelope pull new wood out of the existing stems. `attractors` (400), `influence` (1.6 m), `kill` (0.5 m), `step` (0.3 m), `iterations` (60), `from_level` (0: grow off stems up to this level), `crown_base` (0.35), `crown_top` (1.0, fractions of the height), `crown_width` (0.35 of the height, the radius), `tip_radius` (0.012 m), `pipe_power` (2.2), `up` (0.15: a pull upwards added to each step), `envelope` (0 ellipsoid, 1 the params’ pruning envelope).
`T_roots` – surface roots: `count` (5), `length` (0.12 of the height), `radius` (0.55 of the trunk’s), `down` (12 degrees), `segments` (5), `spread` (25 degrees of random azimuth).
`T_leaves` – leaf cards on the leaf-bearing stems (params `leaves`, `leaf_*`). No settings.
`T_prune` – cuts after growth: `min_radius` (0 m: thinner stems go, with their subtrees), `envelope` (0; 1 cuts stems where they leave the params’ envelope), `max_level` (-1: deeper stems go), `keep` (1: the fraction of leaves kept).
Inheritance diagram
digraph inheritanceafc231269c { bgcolor=transparent; rankdir=BT; size="8.0, 12.0"; "DTOOL_SUPER_BASE" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style=""]; "ReferenceCount" [URL="acron.core.ReferenceCount.html#acron.core.ReferenceCount",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "ReferenceCount" [arrowsize=0.75,style=""]; "TreeOp" [URL="acron.proctree.TreeOp.html#acron.proctree.TreeOp",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "TypedReferenceCount" -> "TreeOp" [arrowsize=0.75,style=""]; "TypedObject" [URL="acron.core.TypedObject.html#acron.core.TypedObject",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "TypedObject" [arrowsize=0.75,style=""]; "TypedReferenceCount" [URL="acron.core.TypedReferenceCount.html#acron.core.TypedReferenceCount",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "TypedObject" -> "TypedReferenceCount" [arrowsize=0.75,style=""]; "ReferenceCount" -> "TypedReferenceCount" [arrowsize=0.75,style=""]; }-
enum Type
-
enumerator T_trunk = 0¶
-
enumerator T_weber_penn = 1¶
-
enumerator T_space_colonization = 2¶
-
enumerator T_roots = 3¶
-
enumerator T_leaves = 4¶
-
enumerator T_prune = 5¶
-
enumerator T_trunk = 0¶
- __init__()¶
- get()¶
- static get_class_type()¶
- get_hash()¶
- get_num_settings()¶
- get_op_id()¶
- get_op_type()¶
- get_setting_name()¶
- has()¶
- is_enabled()¶
- property op_type Type¶
- output()¶
- static parse_type()¶
The inverse of
type_name()(an unknown name raises).
- set()¶
Sets one of the op’s settings (an unknown name raises).
- set_enabled()¶
- set_op_id()¶
- static type_name()¶
The op kind’s name as presets write it: trunk, weber_penn, space_colonization, roots, leaves, prune.