pyFM.mesh.geometryΒΆ

Functions

build_dijkstra_graph(vertices, faces)

Build the sparse symmetric edge-weighted graph used for Dijkstra-based geodesic distance computation.

compute_faces_areas(vertices, faces)

Compute per-face areas of a triangular mesh.

compute_normals(vertices, faces)

Compute face normals of a triangular mesh.

compute_vertex_areas(vertices, faces[, ...])

Compute per-vertex areas of a triangular mesh.

dijkstra_from(inds, graph)

Compute geodesic distances from one or several source vertices to all vertices, using Dijkstra's algorithm on a precomputed edge-weighted graph.

div_f(f, vertices, faces, normals[, ...])

Compute the divergence of a vector field on a mesh.

edges_from_faces(faces)

Compute all edges in the mesh.

farthest_point_sampling(d, k[, random_init, ...])

Sample points using farthest point sampling.

farthest_point_sampling_call(d_func, k[, ...])

Sample points using farthest point sampling, initialized randomly.

farthest_point_sampling_call_sub(d_func, k, ...)

Sample points using farthest point sampling on a mesh, restricted to a set of samples.

farthest_point_sampling_distmat(D, k[, ...])

Sample points using farthest point sampling from a complete distance matrix.

geodesic_distmat_dijkstra(vertices, faces)

Compute the geodesic distance matrix using Dijkstra's algorithm.

geodesic_distmat_fast_marching(vertices, faces)

Compute the geodesic distance matrix using the Fast Marching algorithm.

get_orientation_op(grad_field, vertices, ...)

Compute the linear orientation operator associated to a gradient field grad(f).

grad_f(f, vertices, faces, normals[, ...])

Compute the gradient of one or multiple functions on a mesh.

grad_mat(vertices, faces[, normals, ...])

Return the gradient operator as a (3 * m, n) matrix G.

heat_geodesic_from(inds, vertices, faces, ...)

Compute geodesic distances between vertices of index inds and all other vertices using the Heat Method.

heat_geodmat(vertices, faces, normals, A, W)

Compute geodesic distances between all pairs of vertices using the Heat Method.

heat_geodmat_robust(vertices, faces[, verbose])

Compute the geodesic distance matrix using the Heat Method, with robust computation.

neigh_faces(faces)

Return the indices of neighbor faces for each vertex.

per_vertex_normal(vertices, faces[, ...])

Compute per-vertex normals of a triangular mesh, with a chosen weighting scheme.

per_vertex_normal_area(vertices, faces)

Compute per-vertex normals of a triangular mesh, weighted by the area of adjacent faces.

per_vertex_normal_uniform(vertices, faces[, ...])

Compute per-vertex normals of a triangular mesh, with uniform weights across adjacent faces.