I have a point (x,y,z) in 3d that I would like to rotate. First I would like to rotate the point around another point (0,0,0) 360 degrees. Then I would like to change the plane that the point rotates in by 1 degree and repeat. I have been looking at the rotation_matrix function in http://www.lfd.uci.edu/~gohlke/code/transformations.py.html , however it seems as if the rotation only goes around the x,y or z axis rather than an arbitrary angle. Does anyone know how to accomplish this?
Asked
Active
Viewed 4,148 times
1
-
You can [rotate a point about an axis](http://stackoverflow.com/q/6802577/190597). – unutbu Aug 08 '15 at 22:03
-
I'm unsure of how to define my axis correctly so that I can rotate along every plane (incrementing by 1 degree at a time). I essentially want to simulate a camera or something moving around a point a fixed distance away at all angles (so the path of the camera will create a sphere by the end) – adub Aug 08 '15 at 22:21
-
The axis you want to rotate around is the normal of the plane. To rotate the plane you can pick any vector on the plane (ie any vector orthogonal to the normal) and simply rotate the normal around the axis in that direction. Though I do not think we are really talking about programming anymore... – Michael S Priz Aug 08 '15 at 22:37
1 Answers
0
Rotating around the x, y, and z pretty much is the only way to do it. Rotating a plane is exactly like rotating around an axis. Check out my scratch project for the math.

Blue
- 545
- 3
- 13