0

How to convert from Euler's coordinates E1 = (x1, y1, z1, yaw1, pitch1, roll1) to E2 = (x2, y2, z2, yaw2, pitch2, roll2) where x, y, z are the coordinates of a point and yaw, pitch, roll the direction/orientation of a vector which origin is the point. yaw is around y, pitch around x, roll around z. They are performed in that order. Yaw 0 is normal to the plan xy (opposite to z in E1 and equal to z in E2).

E1 uses a right handed space and E2 a left handed space. Both have the same origin, the same direction for y (top) and z (into the screen). They differ by x which is to the left on E1 and to the right on E2. They also differ by their direction of positive rotations.

I've a custom type to hold the scalar representation and to convert from and to the equivalent WPF Matrix3d representation.

starblue
  • 55,348
  • 14
  • 97
  • 151
742
  • 3,009
  • 3
  • 23
  • 18
  • Usually to convert from an arbitrary base of a vector space into another you simply solve the equation ₂ = ⋅ ₁ where then is the transformation matrix to convert from ₁ into ₂. Since you know your bases ((1, 1, 1) and (−1, 1, 1), respectively) this shouldn't be too difficult. – Joey Apr 29 '10 at 07:49
  • Thanks Johannes. I'm not a math person and this is not clear to me. I have tried some combinations randomly. It seems this one works for converting left-handed to a WPF/right-handed space using a custom "Point6DoF" type which holds a 3D point and a 3D look-at direction: Point6DoF positionInRightHanded = new Point6DoF(-X, Y, Z, -Yaw, Pitch, -Roll). Does that make sense to you? – 742 Apr 29 '10 at 17:33

1 Answers1

0

In the end this solution works for me:

Point6DoF right = new Point6DoF(
    -left.X, left.Y, left.Z,-left.Yaw, left.Pitch, -left.Roll)

where Point6DoF is the class that holds the position and Euler's angles.

742
  • 3,009
  • 3
  • 23
  • 18