Skip to content

Latest commit

 

History

History
30 lines (22 loc) · 1.83 KB

README.md

File metadata and controls

30 lines (22 loc) · 1.83 KB

Rigid Packer

Hierarchical Circle Packing with Real Time Dynamics

Screenshot

Demonstration

This script allows you to visualize any hierarchical data (in this case, SQLite database tables) in an intuitive way—using a circular treemap chart. Also, this script allows you to shift the leaves of a tree or entire subtrees with the mouse with saving the result.

The circle packing of the treemap chart is implemented in an original way—in real-time using rigid body physics (the Box2D engine is used). Natural packing instead of rigorous math makes hierarchy editing even more intuitive.

If desired, you can adapt this script to visualize and edit other hierarchical data structures by implementing a wrapper for them similar to the repository.Repository class.

The motive for creating this project is to do manual and automatic control of personal stuff using a database and an interactive chart as a client/editor.

Requirements

  1. Python 3.7–3.8
  2. pip install -r requirements.txt
    • pybox2d – physics engine
    • PyQt5 – GUI
    • pygame – used for frame rate stabilization

Usage

  1. run main.pyw
  2. shuffle items by dragging with mouse
  3. right click on items to select it for picking or deselect
  4. double right click on item with picked up sub-items to reset the selection
  5. double right click on item without picked up sub-items to select or deselect for picking all items of same level
  6. when any items are picked up, left click on another item to shake the picked up items into it
  7. press Escape to quit