pc4bims
is an application software in Python 3 to create circle packing in closed polygons.
- Free software: BSD-2-Clause.
- Documentation: https://pc4bims.readthedocs.io.
- PyPI: https://pypi.python.org/pypi/pc4bims
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
To install pc4bims
open a terminal and type:
pip install pc4bims
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()