Giter Club home page Giter Club logo

rigidpacker's Introduction

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

rigidpacker's People

Contributors

nsuspray avatar

Watchers

 avatar

rigidpacker's Issues

Add text labels to items

Variants:

  1. label on top of children of hovered item and children of all ancestors
  2. translucent labels on top of all items
  3. label item inside each level

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.