Circle packing utility using numpy arrays.
Project description
Circle Packing
Image generated by python3 example/small.py
This library provides a tool for circle packing in python, using the front-chain packing algorithm by Wang et al. and enclosed by a circle computed using the Matoušek-Sharir-Welzl algorithm.
Adapted From D3
The circle pack code is adapted from d3-hierarchy, which comes with the ISC license found in the LICENSE file.
Why?
I was doing some circle-packing visualizations with in the order of 1 million total leaf nodes. Performing the layout in the front-end each time was not only wasteful, but taking too long. I didn't find a Python equivalent that met my needs, so I made this. The output of x, y, and r ar ein a numpy array so it's easier to output as a binary dump. This library could be faster, but it is enough for my purposes.
Installation
Install through pip. E.g. python3 -m pip install npcirclepack.
Note: if you are getting errors, try installing numpy first, then npcirclepack.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file npcirclepack-0.1.0.tar.gz.
File metadata
- Download URL: npcirclepack-0.1.0.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c176b615261bcb5d388c32953c019e033482c5291274a18d187aa61bdaa0fe74
|
|
| MD5 |
22cb2b4f976ba6fb96f84888d6e82212
|
|
| BLAKE2b-256 |
2a426f764132d70d504db535bd9baaf02148aacb2f31f8c78ff478ab4fa8e3c1
|
File details
Details for the file npcirclepack-0.1.0-py3-none-any.whl.
File metadata
- Download URL: npcirclepack-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c3d9a09cfdc84f4ceec73bdf578f8ef1dcba2bd94b1a42b6a124f2c61c04896c
|
|
| MD5 |
e6ca64209b0adb46de1ecedb60738eb0
|
|
| BLAKE2b-256 |
9af357db740d9f6edfd5f7ddff854cca91c4db7f2a3fb22c7418af28c7f8b45c
|