Posted by phlyingpenguin on Fri 3 Oct 00:06
report abuse | download | new post
- from numpy import *
- import OpenGL
- I = matrix([[1,0,0],
- [0,1,0],
- [0,0,1]])
- S = matrix([2,0,0,0,3,0,0,0,1])
- S = S.reshape(3,3)
- T = matrix([1,0,4,0,1,-3,0,0,1]).reshape(3,3)
- R = matrix([cos(pi/4), -sin(pi/4), 0, sin(pi/4), cos(pi/4), 0, 0, 0, 1]).reshape(3,3)
- p = matrix([6,5,1]).reshape(3,1)
- print "S*P"
- print S*p
- print "T*S*p"
- print T*S*p
- print "R*T*S*p"
- print R*T*S*p
- print "R*T*S"
- print R*T*S
- print "C = RTS, C*p"
- C = R*T*S
- print C*p
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.