Xref: utzoo comp.sources.wanted:13348 comp.text:7260 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!munnari.oz.au!brolga!exnirad From: exnirad@brolga.cc.uq.oz.au (Nirad Sharma) Newsgroups: comp.sources.wanted,aus.wanted,comp.text Subject: Hierarchical structure -> graphical representation (c.f. GPIC/GTROFF) Summary: Translation of a hierarchical structure into a graphical representation Keywords: hierarchy, gpic, gtroff Message-ID: <1990Sep22.032404.20089@brolga.cc.uq.oz.au> Date: 22 Sep 90 03:24:04 GMT Distribution: comp Organization: Prentice Computer Centre, The University of Queensland, Australia. Lines: 29 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