Questions tagged [euler-angles]

The Euler angles are three angles introduced by Leonhard Euler to describe the 3D orientation of a rigid body.

The idea of Euler angles is to split the complete rotation of a cartesian coordinate system into three simpler rotations about the axes of this system. Euler angles also represent three composed rotations that move a reference frame to a given referred frame. This is equivalent to saying that any orientation can be achieved by composing three elemental rotations (rotations around a single axis), and also equivalent to saying that any rotation matrix can be decomposed as a product of three elemental rotation matrices.

475 questions
3
votes
0 answers

Unsure of how to prevent 270 degrees from being confused with 90 degrees when converting from rotational matrices to quaternion

I have a struct for a 3x3 rotational matrix of integers that I need to store the data for rotation of objects in a 3D environment to be easily serialized into XML and interpreted by another program TL;DR, Unsure of how to implement a fix for a…
Nifley
  • 31
  • 1
  • 3
3
votes
3 answers

Problem with Euler angles from YZX Rotation Matrix

I've gotten stuck getting my euler angles out my rotation matrix. My conventions are: Left-handed (x right, z back, y up) YZX Left handed angle rotation My rotation matrix is built up from Euler angles like (from my code): var xRotationMatrix…
Brendon McLean
  • 416
  • 5
  • 10
3
votes
1 answer

Rotating multiple points around axis using Quaternion

I want to simply rotate multiple points (a shape) around X, Y, Z axis using Quaternions. I convert my Euler Angles to Quaternion so the quaternion has been setup and seems good. I have my things setup like this: q (quaternion) -> W: 0.99, X: 0.07,…
Albert4224
  • 73
  • 1
  • 7
3
votes
0 answers

How to change quaternion from mouse input?

I would like to make a 3D viewer which is controllable from mouse input with OpenGL. The camera moves around the object using a polar coordinate system. I use Euler angle and glm::lookat, this system works with some limitation. At this case, pitch…
Masahiro
  • 155
  • 9
3
votes
1 answer

From Euler angles to Quaternions

I am working on a simulation of plane movement. For now, I used Euler angles to transform "body frame" to "world frame" and it works fine. Recently I learned about quaternions and their advantages over the rotation matrix (gimbal lock) and I tried…
begginer
  • 189
  • 2
  • 10
3
votes
1 answer

Python OpenCV solvePnP convert to euler angles

I am using solvePnP like this.. import cv2 import numpy as np # Read Image im = cv2.imread("headPose.jpg"); size = im.shape #2D image points. If you change the image, you need to change vector image_points = np.array([ …
fightstarr20
  • 11,682
  • 40
  • 154
  • 278
3
votes
1 answer

issue combining 2 Euler angles with GLM

I have the following code: #define GLM_ENABLE_EXPERIMENTAL #include #include #include // combines 2 XYZ euler angles given in degrees glm::vec3 EulerCombine(const glm::vec3& first, const glm::vec3&…
Theo Walton
  • 1,085
  • 9
  • 24
3
votes
1 answer

Changing XYZ order when converting Euler-angles to quaternions

I'm using the following code to produce a quaternion from XYZ Euler-Angles in radians: c1 = Math.cos( x / 2 ) c2 = Math.cos( y / 2 ) c3 = Math.cos( z / 2 ) s1 = Math.sin( x / 2 ) s2 = Math.sin( y / 2 ) s3 = Math.sin( z / 2 ) quaternion = [ …
treeseal7
  • 739
  • 8
  • 22
3
votes
1 answer

Quaternion from vector x y z components - in Qt

I I would like o know if there is a direct way to get the quaternion representing the rotation of a vector that lies on one of the axes (the Z axis for instance), when I have the x,y,z components of the resulting vector. In the image above, I have…
Filartrix
  • 157
  • 1
  • 10
3
votes
2 answers

Rotate GameObject back and forth

I would like to rotate an object back and forth between 90,-90 on the Y axis. The problem is I can set the object in the editor at -90, but when I run the project -90 suddenly becomes 270. Anyway here is the code that I'm using: void Update() { …
Abdou023
  • 1,654
  • 2
  • 24
  • 45
3
votes
0 answers

Conversion of quaternion to Euler angles for pitch crossing 90 degrees

I am using 9-axis IMU fused orientation data and I need to convert quaternion pose to Euler angles for purposes of graphing the data to user. I want my all three angles to be from range [-180, 180] and I found a lot of references how to do that…
Igor Perić
  • 171
  • 1
  • 8
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

different results using quaternion and Euler angles

I am using two methods to rotate a point p0 (a vector) in 3D space. I have the world coordinate system (WCS), shown in black, and coordinate system 1 (CS1), shown in blue, which is defined to be rotated by 10 degrees around z-axis. I first calculate…
NKN
  • 6,482
  • 6
  • 36
  • 55
3
votes
1 answer

Calculate forward and up vectors from euler position and rotation?

I have an object in 3D space where all I have is a euler position and rotation. How can I calculate forward and up vectors from the information I have? I know that I can calculate the forward vector in this way: Vector3 forward =…
Zhro
  • 2,546
  • 2
  • 29
  • 39
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…