ahmdtaha / tree_viz

Java code to visualize trees (e.g., BST, BTree, QuadTree)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tree Viz

Java code to visualize trees (Binary + B Tree)

TL;DR

The CompactTreeViz takes a tree-description and draws the tree in a png file. The tree-description is an ArrayList and leverages the format propose by Jim Blackler.

Sample Binary Search Tree

Sample BTree

Usage

run Main.java from package src.tree_viz. This is an eclipse project. After running Main.java, png files are created in the project root directory.

TODO

  • Explain how to support other trees, i.e., treeDescription
  • Resize the node (width and height) dynamically based on its content.

Contributor list

While TreeViz is a one man job, I borrowed somethings from others and I want to make this clear.

  1. I use the tree format propose by Jim Blackler. This allows TreeViz to support any tree structure and not just binary trees.
  2. Since this tool is about visualization only, I borrowed the BST and the BTree implementations from mvyas85 and phishman3579, respectively.

I hope other people contribute to the TreeViz and improve it. Thus, pull requests are welcomed.

Release History

  • First code commit on 16 April 2021

Misc Notes

  • I developed TreeViz while TAing CMSC420 with Jason Filippou. CMSC420 is an advanced data-structures class with a lot of projects about various trees (BST, AVL, BTree, QuadTree). TreeViz is not part of the course requirements; I developed TreeViz to help me debug my implementation. TreeViz helped me visualize my trees after every insertion/deletion, i.e., find bugs faster.

About

Java code to visualize trees (e.g., BST, BTree, QuadTree)


Languages

Language:Java 100.0%