3 ms·
That only works for complete (or "nearly" complete) binary trees, and you can't draw many of these since the number of children in a generation grows exponentia
by raegis 7y ago
That only works for complete (or "nearly" complete) binary trees, and you can't draw many of these since the number of children in a generation grows exponentially. For most trees you have to try to keep the width minimal while avoiding collisions between deeply-nested left and right children. One of the earlier papers to give some precise "niceness" criteria is "Tidier Drawings of Trees" (https://reingold.co/tidier-drawings.pdf https://reingold.co/tidier-drawings.pdf) by Reingold and Tilford, with a companion Pascal program for computing the coordinates.
- virtuous_signal 7y agoFantastic. I would not have thought that binary-tree-drawing could be such a complicated problem.
- ygra 7y agoGraph drawing in general is a field full of complicated problems.