Last active
August 29, 2015 14:00
-
-
Save tshev/11376520 to your computer and use it in GitHub Desktop.
Vector transforamtion between Oz. You shoult be attentive whith floating poing.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import numpy | |
def transformOzVector(alpha, vector): | |
m = numpy.matrix([[numpy.math.cos(alpha), -numpy.math.sin(alpha), 0], | |
[numpy.math.sin(alpha), numpy.math.cos(alpha), 0], | |
[0, 0, 1]]) | |
return m*vector | |
result = transformOzVector(numpy.math.pi*1, numpy.matrix([1,0,0]).T) | |
print result |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment