Questions tagged [rotational-matrices]

Rotational Matrices, also called direction cosine matrices, are matrices that represent a rotation from one coordinate frame to another in Euclidean space.

Rotational Matrices, also called direction cosine matrices, are matrices that represent a rotation from one coordinate frame to another in Euclidean space. They are always square, orthogonal, and include only real elements.

Rotational Matrices can easily be converted to other common rotation representations including and .

373 questions
3
votes
1 answer

Creating a transformation matrix for OpenGL with GLM (Rotations)

Original Question: Problem I have a unit cube that I would like to transform such that it connects two points. I am new to OpenGL and only know the most basic parts of linear algebra. I have attempted to mimic something similar to polar…
user1032677
  • 363
  • 2
  • 11
3
votes
0 answers

Using OpenCV to find radius of a dome from a picture

I have a camera positioned a known distance away from a dome, facing it at a known angle. as seen from the picture, the dome has a strip on it so that I can use image processing to fit an ellipse to it and find the radius. If the camera was…
Cyon
  • 414
  • 1
  • 4
  • 13
3
votes
0 answers

Calculate rotation matrix to transform one vector to another?

There are several questions about this on Stack Overflow, but most use Quaternions and I am looking for something that does not. And this question is all over the web, but it is surprisingly hard to find a straightforward example in code. I am…
bsabiston
  • 721
  • 6
  • 22
3
votes
1 answer

Incorrect right, up and forward after rotation

I am working on adding a matrix handler in my game using OpenGL, and so far most of it works, but I seem to not understand how to properly extract the right, up and forward vectors out of the rotation matrix. I've got the following code: glm::mat4…
3
votes
3 answers

Android: understanding the function remapCoordinateSystem

I have been trying to understand these 2 lines of code SensorManager.getRotationMatrix(RTmp, I, grav, mag); SensorManager.remapCoordinateSystem(RTmp, SensorManager.AXIS_X,SensorManager.AXIS_MINUS_Z, Rot); I read the documentation of…
3
votes
1 answer

How to pad multiple tensors with one on main diagonal and zeros elsewhere?

I have R as 2D rotation matrices of shape (N,2,2). Now I wish to extend each matrix to (3,3) 3D rotation matrices, i.e. to put zeros in each [:,:2,:2] and put 1 to [:,2,2]. How to do this in tensorflow? UPDATE I tried this way R =…
Dims
  • 47,675
  • 117
  • 331
  • 600
3
votes
2 answers

Decomposing rotation matrix (x,y',z'') - Cartesian angles

Decomposing rotation matrix (x,y',z'') - Cartesian angles Im currently working with rotation matrices and I have the following problem: Given three coordinate systems (O0,x0,y0,z0; O1,x1,y1,z1; O2,x2,y2,z2) which coincide. We rotate first the frame…
Marton
  • 43
  • 1
  • 7
3
votes
1 answer

Computing Euler angles from rotation matrix: boundary cases

I want to compute the Euler angles from a rotation matrix in order to find out the orientation associated to that rotation. For that purpose, I am using MATLAB and the function rotm2eul that gives me the rotation first about x-axis, then about…
Fatias7
  • 101
  • 2
  • 11
3
votes
2 answers

Is the rotation matrix unique for a given rotation?

I found two rotation matrices rot1 = [ 0.8736 0.2915 -0.3897; -0.4011 0.8848 -0.2373; 0.2756 0.3636 0.8898] rot2 = [ 0.9874 -0.1420 -0.0700; 0.0700 0.7880 -0.6117; 0.1420…
Mr.Guo
  • 167
  • 1
  • 9
3
votes
1 answer

Offset Euler Angles using rotation matrix

I'm looking for the correct way to apply an offset to a set of Euler rotations. I would like to have a transformation where given a specific set of Euler angles (x1,y1,z1), if I transform them I would get an Euler sequence of (0,0,0). All other…
3
votes
1 answer

Rotation matrix to quaternion equivalence

I am tracking 3 points (3D, x y z) on a rigid body, which I use to define a local coordinate system. I am using this local coordinate system's orientation (in the global frame of reference) to set the view orientation in a VR program. To do this,…
3
votes
1 answer

Is there a good package for by-hand / manual / judgmental factor / component rotation?

I'm trying to add a function to manually (or by-hand, or judgmentally) rotate a factor loadings matrix from principal components analysis to the qmethod R package. By-hand rotation as in: one specifies the angle by which to rotate any given pair of…
maxheld
  • 3,963
  • 2
  • 32
  • 51
3
votes
1 answer

Android Rotation Vector and Rotation Matrix

So I previously asked a question more about what ind of sensor to use for the application I'm building. After some research I know now that it's the rotation vector that I want to use for I want to be able to move a virtual cube on my tablet…
LBes
  • 3,366
  • 1
  • 32
  • 66
3
votes
1 answer

How do I rotate a 3D matrix by 90 degrees counterclockwise?

I'm trying to rotate a matrix counterclockwise by 90 degrees in Java. I found answers on how to do this with a 2D matrix, but my matrix is 3D. Here's how I found out on how to do a 2D rotation: static int[][] rotateCW(int[][] mat) { final int M…
NewGradDev
  • 1,004
  • 6
  • 16
  • 35
3
votes
1 answer

Reverse the rotation of one single axis of CMRotationMatrix

Please bear with me, I'm really awful at matrix math. I have a layer that I want to remain "stationary" with gravity at the referenceAttitude while the phone rotates to other attitudes. I have a motionManager working nicely, am using…