https://github.com/ahmdtaha/tree_viz
Java code to visualize trees (e.g., BST, BTree, QuadTree)
https://github.com/ahmdtaha/tree_viz
avl-tree binary-search-tree binary-trees btree data-structures debugging-tool eclipse java kdtrees quadtree visualization
Last synced: 11 months ago
JSON representation
Java code to visualize trees (e.g., BST, BTree, QuadTree)
- Host: GitHub
- URL: https://github.com/ahmdtaha/tree_viz
- Owner: ahmdtaha
- Created: 2021-04-16T09:26:47.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-04-17T18:03:46.000Z (almost 5 years ago)
- Last Synced: 2025-02-17T11:34:02.972Z (about 1 year ago)
- Topics: avl-tree, binary-search-tree, binary-trees, btree, data-structures, debugging-tool, eclipse, java, kdtrees, quadtree, visualization
- Language: Java
- Homepage:
- Size: 47.9 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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](http://jimblackler.net/treefun/index.html).
### 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](http://jimblackler.net/treefun/index.html). 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](https://github.com/mvyas85/Binary-Tree/blob/master/src/BST/BinarySearchTree.java) and [phishman3579](https://github.com/phishman3579/java-algorithms-implementation/blob/master/src/com/jwetherell/algorithms/data_structures/BTree.java), 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.