Walker's Algorithm for Tree Drawing

Draw Aesthetically Pleasant Trees

Aesthetic Properties

Walker's Algorithm

Background

Properties

Algorithm's Complexity

Walker's algorithms for arbitrary n-ary tree has complexity \(\mathcal{O}(n^2)\), where \(n\) is the number of nodes in the tree.

Implementation

Switching between a vertical and circular layout is possible in the drawing below. Moving the mouse over the nodes will reveal the names of the nodes. The mouse wheel can be used to zoom in or out. The left click allows for moving the drawing.



The JavaScript Code