Added rotation mat routine
@@ -331,6 +331,16 @@ def rotation3d_x(angle):
mat[2, :] = [0.0, s, c]
return mat
+
+def rotation3d_z(angle):
+ c = np.cos(angle)
+ s = np.sin(angle)
+ mat = np.zeros((3, 3))
+ mat[0, :] = [ c, -s, 0.0]
+ mat[1, :] = [ s, c, 0.0]
+ mat[2, :] = [0.0, 0.0, 1.0]
+ return mat
+
if __name__ == '__main__':
t = np.array([0, 1, 0])
n = np.array([1, 0, 0])
