Skip to content

aarizat/pc4bims

Repository files navigation

pc4BIMS : Pack Circles for BIMS

made-with-python PyPI docs License orcid

pc4bims is an application software in Python 3 to create circle packing in closed polygons.

Features

Requirements

The code was written in Python 3. The packages numpy, scipy, matplotlib and triangle are required for using pc4bims. All of them are downloadable from the PyPI repository by opening a terminal and typing the following code lines:

pip install numpy
pip install scipy
pip install matplotlib
pip install triangle

Installation

To install pc4bims open a terminal and type:

pip install pc4bims

Example

To produce the plot shown above execute the following script

from numpy import array
from pc4bims.slope import NaturalSlope
from pc4bims.circlepacking import CirclePacking as CP
surfaceCoords = array([[-2.4900, 18.1614],
                       [0.1022, 17.8824],
                       [1.6975, 17.2845],
                       [3.8909, 15.7301],
                       [5.8963, 14.3090],
                       [8.1183, 13.5779],
                       [9.8663, 13.0027],
                       [13.2865, 3.6058],
                       [20.2865, 3.6058],
                       [21.4347, 3.3231],
                       [22.2823, 2.7114],
                       [23.4751, 2.2252],
                       [24.6522, 1.2056],
                       [25.1701, 0.2488]])
slopeGeometry = NaturalSlope(surfaceCoords)
boundCoords = slopeGeometry.boundCoords
circlePacking = CP(boundCoords, 2)
circlePacking.plot()

About

Application software in Python 3 to create circle packing in closed polygons.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published