edge and tangent calculating, along with testing functions.

This commit is contained in:
Rowan Cockett
2013-07-31 15:07:14 -07:00
parent b07256bbc5
commit 34e380ccb9
3 changed files with 104 additions and 7 deletions
+1 -1
View File
@@ -259,7 +259,7 @@ def faceInfo(xyz, A, B, C, D, average=True):
nD = cross(DA, CD)
length = lambda x: (x[:, 0]**2 + x[:, 1]**2 + x[:, 2]**2)**0.5
normalize = lambda x: x/np.kron(np.ones((1, x.shape[1])), mkvc(length(N), 2))
normalize = lambda x: x/np.kron(np.ones((1, x.shape[1])), mkvc(length(x), 2))
if average:
# average the normals at each vertex.
N = (nA + nB + nC + nD)/4 # this is intrinsically weighted by area