class_docstr: Space of parameterized discrete surfaces.
  
  Each surface is sampled with fixed `n_vertices` vertices and `n_faces`
  faces in :math:`\mathbb{R}^3`.
  
  Each individual surface is represented by a 2d-array of shape
  `[n_vertices, 3]`. This space corresponds to the space of immersions
  defined below, i.e. the
  space of smooth functions from a template to manifold :math:`M`
  into :math:`\mathbb{R}^3`, with non-vanishing Jacobian.
  
  .. math::
      Imm(M,\mathbb{R}^3)=\{ f \in C^{\infty}(M, \mathbb{R}^3)
      \|Df(x)\|\neq 0 \forall x \in M \}.
  
  Parameters
  ----------
  faces : integer array-like, shape=[n_faces, 3]
      Triangulation of the surface.
      Each face is given by 3 indices that indicate its vertices.
class_docstr_tok: ["Space","of","parameterized","discrete","surfaces",".","Each","surface","is","sampled","with","fixed","`","n_vertices","`","vertices","and","`","n_faces","`","faces","in",":","math",":","`","\\mathbb","{","R","}","^3","`",".","Each","individual","surface","is","represented","by","a","2d-array","of","shape","`","[","n_vertices",",","3","]","`",".","This","space","corresponds","to","the","space","of","immersions","defined","below",",","i.e",".","the","space","of","smooth","functions","from","a","template","to","manifold",":","math",":","`","M","`","into",":","math",":","`","\\mathbb","{","R","}","^3","`",",","with","non-vanishing","Jacobian",".","..","math",":",":","Imm","(","M",",","\\mathbb","{","R","}","^3",")","=\\","{","f","\\in","C^","{","\\infty","}","(","M",",","\\mathbb","{","R","}","^3",")","\\|Df","(","x",")","\\|\\neq","0","\\forall","x","\\in","M","\\","}",".","Parameters","--","--","--","--","--","faces",":","integer","array-like",",","shape=","[","n_faces",",","3","]","Triangulation","of","the","surface",".","Each","face","is","given","by","3","indices","that","indicate","its","vertices","."]
docstr: Compute triangle areas for each face of the surface.
  
  Heron's formula gives the triangle's area in terms of its sides a b c:,
  As the square root of the product s(s - a)(s - b)(s - c),
  where s is the semiperimeter of the triangle s = (a + b + c)/2.
  
  Parameters
  ----------
  point : array-like, shape=[..., n_vertices, 3]
       Surface, as the 3D coordinates of the vertices of its triangulation.
  
  Returns
  -------
  _ : array-like, shape=[..., n_faces, 1]
      Triangle area of each face.
docstr_tok: ["Compute","triangle","areas","for","each","face","of","the","surface",".","Heron","'s","formula","gives","the","triangle","'s","area","in","terms","of","its","sides","a","b","c",":",",","As","the","square","root","of","the","product","s","(","s","-","a",")","(","s","-","b",")","(","s","-","c",")",",","where","s","is","the","semiperimeter","of","the","triangle","s","=","(","a","+","b","+","c",")","\/2",".","Parameters","--","--","--","--","--","point",":","array-like",",","shape=","[","...",",","n_vertices",",","3","]","Surface",",","as","the","3D","coordinates","of","the","vertices","of","its","triangulation",".","Returns","--","--","--","-","_",":","array-like",",","shape=","[","...",",","n_faces",",","1","]","Triangle","area","of","each","face","."]
code: def _triangle_areas(self, point):
      """Compute triangle areas for each face of the surface.
  
      Heron's formula gives the triangle's area in terms of its sides a b c:,
      As the square root of the product s(s - a)(s - b)(s - c),
      where s is the semiperimeter of the triangle s = (a + b + c)/2.
  
      Parameters
      ----------
      point : array-like, shape=[..., n_vertices, 3]
           Surface, as the 3D coordinates of the vertices of its triangulation.
  
      Returns
      -------
      _ : array-like, shape=[..., n_faces, 1]
          Triangle area of each face.
      """
      vertex_0, vertex_1, vertex_2 = self._vertices(point)
      len_edge_12 = gs.linalg.norm((vertex_1 - vertex_2), axis=-1)
      len_edge_02 = gs.linalg.norm((vertex_0 - vertex_2), axis=-1)
      len_edge_01 = gs.linalg.norm((vertex_0 - vertex_1), axis=-1)
      half_perimeter = 0.5 * (len_edge_12 + len_edge_02 + len_edge_01)
      return gs.sqrt(
          (
              half_perimeter
              * (half_perimeter - len_edge_12)
              * (half_perimeter - len_edge_02)
              * (half_perimeter - len_edge_01)
          ).clip(min=1e-6)
      )
  
imports: import math
  import geomstats.backend
  from geomstats.geometry.euclidean import Euclidean
  from geomstats.geometry.manifold import Manifold
  from geomstats.geometry.riemannian_metric import RiemannianMetric
  from geomstats.numerics.optimizers import ScipyMinimize
label_desc: Use image node_id 9 for calling the DiscreteSurfaces obj's underlying member method code with example usage: obj._triangle_areas(point) and returns: gs