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

Since the mean curvature calculates the arithmetic mean of two principal curvatures, the default units of \(H\) are Å-1. On the other hand, Gaussian curvature calculates the geometric mean of the two principal curvatures. Therefore, the default units of \(K\) are Å-2. In general, units of mean curvature are [length] -1, and units of Gaussian curvature are [length] -2.

Warning

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.