per_vertex_normals
per_vertex_normals(V, F)
Normal vectors to all vertices on a mesh
Computes area-weighted per-vertex unit normal vectors for a triangle mesh or polyline.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
V |
(n,d) numpy array
|
vertex list of a triangle mesh or polyline |
required |
F |
(m,d) numpy int array
|
face index list of a triangle mesh (edge list for a polyline) |
required |
Returns:
Name | Type | Description |
---|---|---|
N |
(m,d) numpy double array
|
Matrix of per-vertex normals |
See Also
per_face_normals.
Examples:
from gpytoolbox import read_mesh, per_vertex_normals
v,f = read_mesh("test/unit_tests_data/bunny_oded.obj")
n = per_vertex_normals(v,f)
Source code in src/gpytoolbox/per_vertex_normals.py
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
|