Mesh analysis
Indices of local maxima from vals given adjacent points
See reconstruction_performance for optimized versions of this routine.
Parameters : | vals : (N,) array-like
vertex_inds : None or (V,) array-like
adj_inds : sequence
|
---|---|
Returns : | inds : (M,) array
|
Return array of starts and ends of edges from list of faces taking regard of direction.
Parameters : | vertex_inds : sequence
faces : (F, 3) array-like
|
---|---|
Returns : | edgearray : (E2, 2) array
|
If f = number of faces, e = number_of_edges and v = number of vertices, the Euler formula says f-e+v = 2 for a mesh on a sphere. Here, assuming we have a healthy triangulation every face is a triangle, all 3 of whose edges should belong to exactly two faces. So 2*e = 3*f. To avoid integer division and consequential integer rounding we test whether 2*f - 3*f + 2*v == 4 or, more generally, whether 2*v - f == 2*\chi where \chi is the Euler characteristic of the mesh.
Parameters : | vertices : (N,3) array-like
faces : (M,3) array-like of type int
chi : int, or None
|
---|---|
Returns : | check : bool
|
Return indices of neighbors for each vertex within faces
Parameters : | faces : (F, 3) array-like
|
---|---|
Returns : | adj : list
|
Check that a sphere mesh is compatible with peak_finding
Parameters : | vertices : (N,3) array-like
hemisphere : str, optional
equator_thresh : None or float, optional
dist_thresh : None or float, optional
|
---|---|
Returns : | compatible : bool
|
Indices for hemisphere from an array of vertices on a sphere
Selects the vertices from a sphere that lie in one hemisphere. If there are pairs of symmetric points on the equator, we return only the first occurring of each pair.
Parameters : | vertices : (N,3) array-like
hemisphere : str, optional
equator_thresh : None or float, optional
dist_thresh : None or float, optional
|
---|---|
Returns : | inds : (P,) array
|
Notes
We expect the sphere to be symmetric, and so there may well be points on the sphere equator that are both on the same diameter line. The routine returns the first of the two points in the original order of vertices.
Return matrix which shows the adjacent vertices of each vertex
Parameters : | vertex_inds : sequence
faces : (F, 3) array-like
|
---|
Return faces containing any of vertex_inds
Parameters : | vertex_inds : sequence
faces : (F, 3) array-like
|
---|---|
Returns : | less_faces : (P, 3) array
|
Return indices of neighbors of vertices given faces
Parameters : | vertex_inds : sequence
faces : (F, 3) array-like
|
---|---|
Returns : | adj : list
|