Function gamer::getTangent(const SurfaceMesh&, SurfaceMesh::SimplexID<1>)

Function Documentation

tensor<double, 3, 2> gamer::getTangent(const SurfaceMesh &mesh, SurfaceMesh::SimplexID<1> vertexID)

Compute the tangent to a vertex.

The vertex normal is defined as the mean of incident triangle normals as follows, \( \mathbf{n} = \frac{1}{N} \sum_{i=0}^{N, \textrm{incident triangle}} n_t\). where \(\mathbf{n}\) is the vertex normal, \(N\) is the number of incident faces, and \(n_i\) is the normal of incident triangle \(i\).

Parameters
  • mesh[in] SurfaceMesh of interest.

  • vertexID[in] SimplexID of the vertex to get the tangent of.

Returns

Returns a 2-tensor representing the tangent plane.