An R-Tree is a data structure useful in spatial access methods. This implementation of an R-Tree is focused on 2 things.
Firstly to provide a tool used to see what an R-Tree looks like in order to get a better understanding of the data structure.
Secondly this implementation adds a fun twist where the shape of any leaf region as well as any combined region can be a circle or rectangle.
Reducing an R-Tree is the process of taking a list of regions (shapes) and repeatedly combining the closest 2 regions into one parent region until there is only 1 region left. That region is now the root of the R-Tree.
This visualizer is used by
First: Choose between the Preset, Build Your Own, or Random GUI modes.
Second: Generate shapes in the Leaf Generation Options.
Third: Choose your Combination Shape Types.
Fourth: Hit the Reduce Shapes button.
Fifth (Optional): using step foreward/step back buttons to watch the reduction process that makes the tree.
Helpful Tips
1. The width and height of the shape canvas is 100 units when filled randomly but you can manually add a shape anywhere under the Build Your Own GUI.
2. WARNING the reduce algorithm takes exponential time with more shapes so if you have more then 1500 shapes expect to wait a long time.
3. In the Build Your Own and Random Gui the colors of Rectangles and Circles can be chosen separately.