Basic geometry

Area and normals

MeshProcessing.vertexnormalsMethod
vnrm, trm, ar = vertexnormals(mesh[; weight=:area])

Estimate vertex normals from weighted triangle normals. Choices for weight are

  • :area area weighting
  • :invarea inversearea weighting
  • :uniform uniform weighting

See also trianglenormals

source

Transformations

MeshProcessing.makecenterdunitcubeMethod

Make transformation that translates and uniformly scales mesh to bounding box [-1,1]^3`.

The transformation is returned as NamedTuple, which defines arguments to transform.

source
MeshProcessing.makecenterunitsphereMethod

Make transformation that translates and uniformly scales mesh to the unit sphere.

The transformation is returned as NamedTuple, which defines arguments to transform.

source

Statistics

MeshProcessing.pcaFunction
  U, σ, μ = pca(mesh[; μ=mean(mesh)])

Compute Principle Component Analysis of positions(mesh). The mean positions μ spectral decomposition of the covariance matrix C= X'*X / n, such that

C = U * Diagonal(σ)^2 * U'

and σ[1] >= σ[2] >= σ[3] contains the singular values of the positions.

source