Skip to content

igl.triangle

Python API reference for igl.triangle.

scaf_precompute

scaf_precompute(V: float64[m, n], F: int32[m, n], V_init: float64[m, n], scaf_energy: 'igl::MappingEnergyType', b: int32[m], bc: float64[m, n], soft_p: float, data: SCAFData) -> None

Compute necessary information to start using SCAF

Parameters

  • V — #V by 3 list of mesh vertex positions
  • F — #F by 3/3 list of mesh faces (triangles/tets)
  • V_init — #V by 3 list of initial mesh vertex positions
  • data — resulting precomputed data
  • slim_energy — Energy type to minimize
  • b — list of boundary indices into V (soft constraint)
  • bc — #b by dim list of boundary conditions (soft constraint)
  • soft_p — Soft penalty factor (can be zero)

scaf_solve

scaf_solve(iter_num: int, data: SCAFData) -> float64[m, n]

Run iter_num iterations of SCAF, with precomputed data

Parameters

  • data — precomputed data
  • iter_num — number of iterations to run

Returns

  • resulting V_o (in SLIMData): #V by dim list of mesh vertex positions

scaf_system

scaf_system(s: SCAFData) -> tuple[scipy.sparse.csc_matrix[float], float64[m]]

Set up the SCAF system L * uv = rhs, without solving it.

Parameters

  • s: — igl::SCAFData. Will be modified by energy and Jacobian computation.
  • L: — m by m matrix
  • rhs: — m by 1 vector with m = dim * (#V_mesh + #V_scaf - #V_frame)

triangulate

C++ reference

triangulate(V: float64[m, n], E: int64[m, n] = Ellipsis, H: float64[m, n] = Ellipsis, VM: int64[m] = Ellipsis, EM: int64[m] = Ellipsis, flags: str = '') -> tuple[float64[m, n], int64[m, n], int64[m], int64[m, n], int64[m]]

Triangulate the interior of a polygon using the triangle library.

Parameters

  • V — #V by 2 list of 2D vertex positions
  • E — #E by 2 list of vertex ids forming unoriented edges of the boundary of the polygon
  • H — #H by 2 coordinates of points contained inside holes of the polygon
  • VM — #V list of markers for input vertices
  • EM — #E list of markers for input edges
  • flags — string of options pass to triangle (see triangle documentation)
  • V2 — #V2 by 2 coordinates of the vertives of the generated triangulation
  • F2 — #F2 by 3 list of indices forming the faces of the generated triangulation
  • VM2 — #V2 list of markers for output vertices
  • E2 — #E2 by 2 list of output edges
  • EM2 — #E2 list of markers for output edges

SCAFData