pc4bims/circlepacking.py
def arealProportion(self):
        '''Determine the relation between the area of the circles packed and
        the area the polygon.

        Returns:
        -------
        proportion : `float`
            Quotient between the area of the circles and the polygon

        Examples:
        --------
            >>> 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, depth=2)
            >>> circlePacking.arealProportion()

            >>> from numpy import array
            >>> from pc4bims.basegeom import Polygon
            >>> from pc4bims.circlepacking import CirclePacking as CP
            >>> coords = array([[2, 2], [2, 6], [8, 6], [8, 2]])
            >>> polygon = Polygon(coords)
            >>> boundCoords = polygon.boundCoords
            >>> circlePacking = CP(boundCoords)
            >>> circlePacking.arealProportion()
        '''
        proportion = sum([c.area for c in self.circlesInPoly]) / self.area
        return proportion
Determine the relation between the area of the circles packed and
        the area the polygon.

        Returns:
        -------
        proportion : `float`
            Quotient between the area of the circles and the polygon

        Examples:
        --------
            >>> 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, depth=2)
            >>> circlePacking.arealProportion()

            >>> from numpy import array
            >>> from pc4bims.basegeom import Polygon
            >>> from pc4bims.circlepacking import CirclePacking as CP
            >>> coords = array([[2, 2], [2, 6], [8, 6], [8, 2]])
            >>> polygon = Polygon(coords)
            >>> boundCoords = polygon.boundCoords
            >>> circlePacking = CP(boundCoords)
            >>> circlePacking.arealProportion()
        
Determine the relation between the area of the circles packed and
the area the polygon.
Determine the relation between the area of the circles packed and the area the polygon .
def arealProportion(self):
        proportion = sum([c.area for c in self.circlesInPoly]) / self.area
        return proportion
def arealProportion ( self ) : proportion = sum ( [ c . area for c in self . circlesInPoly ] ) / self . area return proportion
Determine the relation between the area of the circles packed and
the area the polygon.
Determine the relation between the area of the circles packed and the area the polygon .
'''Determine the relation between the area of the circles packed and
        the area the polygon.

        Returns:
        -------
        proportion : `float`
            Quotient between the area of the circles and the polygon

        Examples:
        --------
            >>> 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, depth=2)
            >>> circlePacking.arealProportion()

            >>> from numpy import array
            >>> from pc4bims.basegeom import Polygon
            >>> from pc4bims.circlepacking import CirclePacking as CP
            >>> coords = array([[2, 2], [2, 6], [8, 6], [8, 2]])
            >>> polygon = Polygon(coords)
            >>> boundCoords = polygon.boundCoords
            >>> circlePacking = CP(boundCoords)
            >>> circlePacking.arealProportion()
        '''
None
self
examples


>>> from numpy import array
>>> from pc4bims.basegeom import Polygon
>>> from pc4bims.circlepacking import CirclePacking as CP
>>> coords = array([[2, 2], [2, 6], [8, 6], [8, 2]])
>>> polygon = Polygon(coords)
>>> boundCoords = polygon.boundCoords
>>> circlePacking = CP(boundCoords)
>>> circlePacking.arealProportion()
>>> from numpy import array >>> from pc4bims . basegeom import Polygon >>> from pc4bims . circlepacking import CirclePacking as CP >>> coords = array ( [[ 2 2 ] [ 2 6 ] [ 8 6 ] [ 8 2 ]] ) >>> polygon = Polygon ( coords ) >>> boundCoords = polygon . boundCoords >>> circlePacking = CP ( boundCoords ) >>> circlePacking . arealProportion ()