# Curvature¶

In MembraneCurvature, we calculate Gaussian and mean curvature from a cloud of points.

Gaussian curvature is defined by

$K = \frac{\partial_{xx}\partial_{yy}-\partial_{xy}^2} {(1+\partial_x^2+\partial_y^2)^2}.$

Mean curvature is defined by

$H = \frac{(1+\partial_x^2)\partial_{yy}+(1+\partial_y^2)\partial_{xx}-2\partial_x\partial_y\partial_{xy}} {2(1+\partial_x^2+\partial_y^2)^{3/2}}.$

Notes

Numpy cannot calculate the gradient for arrays with inner array of length==1 unless axis=0 is specified. Therefore in the functions here included for mean and Gaussian curvature, shape of arrays must be at least (2,2). In general, to calculate a numerical gradients shape of arrays must be >=(edge_order + 1).

## Functions¶

membrane_curvature.curvature.gaussian_curvature(Z)[source]

Calculate gaussian curvature from Z cloud points.

Parameters

Z (np.ndarray.) – Multidimensional array of shape (n,n).

Returns

K – The result of gaussian curvature of Z. Returns multidimensional array object with values of gaussian curvature of shape (n, n).

Return type

np.ndarray.

membrane_curvature.curvature.mean_curvature(Z)[source]

Calculates mean curvature from Z cloud points.

Parameters

Z (np.ndarray.) – Multidimensional array of shape (n,n).

Returns

H – The result of gaussian curvature of Z. Returns multidimensional array object with values of gaussian curvature of shape (n, n).

Return type

np.ndarray.