I am looking for a library which would give me the exact coordinates of each node in a tree (any tree, not just binary trees).
Let's say I define the tree in the following notation
(() (() (() () ()))
And some library gives me the coordinates like this:
[500 0]([200 50]() [600 50]([500 100]() [750 100]([600 150]() [700 150]() [800 150]()))
or any other notation which uniquely represents a tree.
This kind of library would enable a space-efficient drawing of trees and would also solve the problem of overlapping nodes and links. For example, if a tree is a list infact, I would like that library to take that into account and arrange nodes in a single column or row, to save space.
If nothing similar exists, an algorithm would also come in handy, provided that it can be implemented relatively easily.