# Trees & Hierarchies **Track:** Objects, Data Structures & Algorithms — Creative Coding — the existing 50 **Framework / surface:** p5.js **Level:** Intermediate **Prerequisites:** Linked Lists **In one line:** Data that branches from a root into parents and children. ## Theory, aesthetics & inspiration A tree is data that branches from a single root into parents and children, encoding hierarchy and recursion in one shape. Donald Knuth devotes much of "The Art of Computer Programming" to trees as fundamental structures, and the form recurs across computing: file systems, scene graphs, parse trees. For the artist, the tree is also a generative principle—Aristid Lindenmayer's L-systems, elaborated with Przemyslaw Prusinkiewicz in "The Algorithmic Beauty of Plants," grow botanical form from recursive branching rules, and the same recursion produces fractals. Structure here is directly visual: the data's shape and the rendered image converge, and traversing the hierarchy becomes a way of drawing it.