Skip to content

poypoyan/treedrawing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

treedrawing

Naive Rooted Tree Drawing Algorithm

The objective is simple. From this . . .

Input Tree Data

. . . to this!

Output Tree Drawing

Of course, the tree data above is just an example. Input tree can be a "pointer" to database, spreadsheet, etc.

This is written in Python and parts of the algorithm are recursive. Hence, expect the performance to be slower and memory-intensive for larger trees.

Note that intersecting branches in a manner like in image below may occur, wherein a sub-rooted tree is sandwiched between two children of another sub-rooted tree.

Sample of Possible Intersection Branches

Algorithm Description

https://github.com/poypoyan/matematex/blob/main/files/treedrawing.pdf

Installation & Tutorial

  1. Just download the ZIP for this repository, extract to a folder.
  2. Just run python example.py (Windows) or python3 example.py (Lunix) in your terminal.
  3. The example.py contains information on how to use tdcore.py.

Found a bug? Suggest a feature? Please post on issues.

Releases

No releases published

Packages

No packages published

Languages