Skip to content

Visual hierarchy editor based on a circular treemap chart with real-time packing using a rigid body physics engine. (nested circles, python, pyqt, qt, pyqt5, box2d, pybox2d)

License

Notifications You must be signed in to change notification settings

NSUSpray/RigidPacker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Visual hierarchy editor based on a circular treemap chart with real-time packing using a rigid body physics engine. (nested circles, python, pyqt, qt, pyqt5, box2d, pybox2d)

Topics

Resources

License

Stars

Watchers

Forks

Languages