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 positionsF— #F by 3/3 list of mesh faces (triangles/tets)V_init— #V by 3 list of initial mesh vertex positionsdata— resulting precomputed dataslim_energy— Energy type to minimizeb— 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 dataiter_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 matrixrhs:— m by 1 vector with m = dim * (#V_mesh + #V_scaf - #V_frame)
triangulate¶
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 positionsE— #E by 2 list of vertex ids forming unoriented edges of the boundary of the polygonH— #H by 2 coordinates of points contained inside holes of the polygonVM— #V list of markers for input verticesEM— #E list of markers for input edgesflags— string of options pass to triangle (see triangle documentation)V2— #V2 by 2 coordinates of the vertives of the generated triangulationF2— #F2 by 3 list of indices forming the faces of the generated triangulationVM2— #V2 list of markers for output verticesE2— #E2 by 2 list of output edgesEM2— #E2 list of markers for output edges