fixed coordinate system convention to be right handed always instead of random left and right handed assignment

This commit is contained in:
tiasmaiti 2016-09-10 16:35:50 -04:00
parent 2daad7542e
commit 06405bc251
1 changed files with 2 additions and 0 deletions

View File

@ -78,6 +78,8 @@ for name in filenames:
for type, data in items.iteritems():
for column in data['column']:
(u,v) = np.linalg.eigh(np.array(map(float,table.data[column:column+data['dim']])).reshape(data['shape']))
if np.dot(np.cross(v[:,0], v[:,1]), v[:,2]) < 0.0 :
v[:, 2] *= -1.0
table.data_append(list(u))
table.data_append(list(v.transpose().reshape(data['dim'])))
outputAlive = table.data_write() # output processed line