[frames] | no frames]

# Source Code for Module DejaVu.rotationMatrices

1  #
2  #  collection of standard 4x4 rotation matrices
3  #  about the X, Y and Z axis of 10, 30, 45, 90, 180 degrees
4  #
5   = {
6  }
7
8  import math, Numeric
9  from mglutil.math.rotax import rotax
10
11  orig = Numeric.array( (0,0,0), 'f')
12  X = Numeric.array( (1,0,0), 'f')
13  Y = Numeric.array( (0,1,0), 'f')
14  Z = Numeric.array( (0,0,1), 'f')
15
16  for angle in [1, 5, 10, 30, 45, 90, 180]:
17  ['X'+str(angle)] = rotax( orig, X, angle*math.pi/180.)
18  ['X-'+str(angle)] = rotax( orig, X, -angle*math.pi/180.)
19
20  for angle in [1, 5, 10, 30, 45, 90, 180]:
21  ['Y'+str(angle)] = rotax( orig, Y, angle*math.pi/180.)
22  ['Y-'+str(angle)] = rotax( orig, Y, -angle*math.pi/180.)
23
24  for angle in [1, 5, 10, 30, 45, 90, 180]:
25  ['Z'+str(angle)] = rotax( orig, Z, angle*math.pi/180.)
26  ['Z-'+str(angle)] = rotax( orig, Z, -angle*math.pi/180.)
27

 Generated by Epydoc 3.0alpha3 on Fri Nov 2 14:07:56 2007 http://epydoc.sourceforge.net