crack_density

crack_density(cracks, area)[source]

Compute the crack density from an array of crack coordinates.

The crack density is the combined length of all cracks in a given area. Therefore, its unit is m^-1.

Parameters
cracks: array-like

Array with the coordinates of the crack with the following structure: ([[x0, y0],[x1,y1]], [[…]]) where x0 and y0 are the starting coordinates and x1, y1 the end of one crack. Each crack is represented by a 2x2 array stacked into a bigger array (x,2,2).

area: float

The area to which the density is refered to.

Returns
crack density: float