Recently I realized it doesn't paint from the root "down", but paints from the root node's first child "out".
So I'm sharing this and documenting my struggles; perhaps I'll find ways in which my own mental inefficiencies will be documented and captured. There is certainly an element of hubris in posting at all - I'm hoping that it will be balanced by the fact that these posts will tend to document my failures as well as discoveries I make.
Here are things I've discovered in the class:
1. The edge DataList is only used in setting the rendering of the edges (directed).
It does not affect the order or position of the parent-child relationship in the tree.2. Depth is an unsigned integer.
I am keeping a separate array of the edges, as well as the edge's inversion state.
The edges are accessible through the visualization.data.edges DataList object.
The depth of the root node is 0.3. Node positions are based upon their effective distance from the first child of the root node.
The depth of a child of the root node is 1.
The depth of a parent of the root node is -1 ... a problem for unsigned integers.
This node's breadth doesn't really change.4. Prelim is distance from the reference wall to where the node "ought" to be.
Adding another child to the root node moves the root node the "_dspace".
It also moves the new child node two "_dspaces" away from the first root node.
The reference wall is the wall against which you're painting.5. Mod is distance between the prelim and the assumed midpoint of the parent node.
If your using the default orientation (Top to Bottom) this is the left wall
Thus the prelim in this case would be the distance from the left wall.
Prelim effectively points to the middle between all children of the parent
Mod is the offset from that middle.
No comments:
Post a Comment