Giter Site home page Giter Site logo

packcircles's Introduction

packCircles

version 1.0

Author: Peter Menzel [email protected]

About

packCircles arranges a list of circles, which are denoted by their area, by consecutively placing each circle externally tangent to two previously placed circles at the point closest to the midpoint of the plot. The output is an SVG file.

The program implements the algorithm described in the paper: "Visualization of large hierarchical data by circle packing" by Weixin Wang, Hui Wang, Guozhong Dai, and Hongan Wang in Proceedings of the SIGCHI Conference on Human Factors in Computing Systems, 2006, pp. 517-520.

Source code is partially based on a implementation of this algorithm in the ProtoVis javascript library.

Example

Usage

Download:

git clone https://github.com/pmenzel/packCircles.git

Compile:

gcc -O3 -o packCircles packCircles.c -lm

Run:

./packCircles -i INPUTFILE > output.svg

The input file has at least one unsigned long number per line that denotes the area of the circle. Two additional tab-separated columns can be used for the fill color and the name of each circle, which will be used in the title element for each circle. Colors need to be valid CSS color names, for example: red, #12AB56, or rgb(123,89,12).

The option -c can be used to generate colors programmatically for circles with no assigned colors in the input file. Colors are selected from the HSV color space by applying this method for iteratively choosing new values for H using the Golden Ratio, and using fixed values for S (0.5) and V (0.9).

R package

packCircles is also included in this R package by mbedward.

License

Copyright (c) 2016 Peter Menzel

The FreeBSD License applies for packCircles.

See the file LICENSE.

packcircles's People

Contributors

pmenzel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

mbedward

packcircles's Issues

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.