# mpacts.geometrygenerators. laplace_beltrami¶

In order to be able to use this module import it like this:

```import mpacts.geometrygenerators.laplace_beltrami
#or assign it to a shorter name
import mpacts.geometrygenerators.laplace_beltrami as lap
```
`mpacts.geometrygenerators.laplace_beltrami.``laplace_beltrami`(ico, con=None)

Calculates the Laplace-Beltrami operator for all vertices in ico, where ico can be either derived from icosahedron (TimO), or from polyhedron (BertT). The mean curvature is 1/2*norm(K), where K is this Laplace-Beltrami operator. See also paper of Meyer et al. 2002 “Discrete Differential-Geometry Operators for Triangulated 2-Manifolds”

`mpacts.geometrygenerators.laplace_beltrami.``node_area`(ico, con=None)
`mpacts.geometrygenerators.laplace_beltrami.``node_normal`(ico, con=None)
`mpacts.geometrygenerators.laplace_beltrami.``rotate_array_to_element0`(array, element, isIndex=False)

rotates a python list or numpy array which contains the element <element>, so that that element is first. The rotated array is returned.

Parameters:
array np.array or list - if multidimensional, the order of the rows
will be changed (zeroeth/first dimension)
elment one element that is contaiend (exactly!) in the array, that
should be the first

isIndex if True, the array is rotated by <element> elements...

`mpacts.geometrygenerators.laplace_beltrami.``triangle_inverse_curvatures`(lbo, ico)

Calculates inverse curvatures for all triangles of an icosphere or polygon, in the order of the list of triangles... Parameters:

lbo: list of results of the laplace-beltrami operator for the nodes
(order as nodes in ico!)

ico: an icosphere or icosahedron or polygon

`mpacts.geometrygenerators.laplace_beltrami.``voronoi_area_vertex0_triangle`(triangle_vertices, areaTriangle=None, returns=None)

Returns the (generalized) Voronoi area of vertex0 in the triangle spanned by three vertices. More specifically, it only returns the Voronoi area for acute triangles; In the obtuse case(s), only a portion of the original triangle’s area is returned. This is necessary for the Laplace-Beltrami calculations to be accurate. Parameters:

triangle_vertices numpy array (or python list) with three vertices areaTriangle if not given, will be (re-)calculated... returns a list or numpy array with the area, and the two

cotangent angles in the triangle corners 1 and 2 - this is for efficiency reasons...