exnirad@brolga.cc.uq.oz.au (Nirad Sharma) (09/24/90)
I wish to translate a c representation of a hierarchical structure
i.e. struct info {
...attributes...
struct info *children, *sibling
}
into PIC statements that will generate visually balanced trees
i.e. o
/ \
o o
/ | \
o o o
It is not as simple as it looks to get *pleasing* output rather than the
rough-and-ready result of just dumping the branches recursively one by one.
(Note that the example sketched above is a very very simple example and that
problem of appearance occurs as the trees get more complex. Draw some by hand
to verify this.)
I am sure that this must have been done by someone already, maybe for computer
science departments printing notes to teach undergrads about hierarchies. If
not, I will have to bash something out (though deadlines are KILLING me!).
Thanks for any help.
Nirad Sharma (exnirad@brolga.cc.uq.oz.au)
Continuing Education Unit
The University of Queensland
AUSTRALIA