My Math Forum  

Go Back   My Math Forum > College Math Forum > Linear Algebra

Linear Algebra Linear Algebra Math Forum


Reply
 
LinkBack Thread Tools Display Modes
July 12th, 2017, 05:04 PM   #1
Newbie
 
Joined: Dec 2014
From: Tennessee

Posts: 3
Thanks: 0

Extracting Eulers from Two Ordered Bases

Okay, it's been years since I've been here, but I suppose better back late than never.

I've got a nettlesome problem, and I'm wondering if there's a good answer. It's going to take a bit of setup to explain it though. First, we've got to conceptualize an ordered basis (or just basis) in 3D space. It's something like this...



If you study it, you'll see that it can be defined by four points: An Origin, an AxisX, and AxisY, and an AxisZ in 3D space.

Now, I don't care about the origin, so let's just assume that all the bases are sitting on a <0,0,0> origin. That'll simplify things a bit.

Now, let's assume we've got two of these things (bases) and that they're rotated (oriented) differently from each other. We'll call one the Parent and the other the Child.

We can now imagine extracting a set of Euler angles from these Parent and Child bases that would tell us how to rotate the Parent to agree with the Child.

I can get all that done, but here's my problem: There is more than one way to represent the Eulers between two bases. Just to illustrate the problem in the simplest way. Let's say that our two bases are actually rotated in exactly the same way. In this case, the obvious set of Eulers would be <0°,0°,0°>. However, as an alternative, we could also say <180°,180°,180°>.

Here's my problem/question. When extracting the Eulers between two bases, is there some standard way to represent the Eulers?

To expound some more, I'm trying to write some code that emulates some other extremely vetted code (to which I don't have the source). The vetted code returns these Eulers between two bases:

<-161.4196° 98.9894° -160.3156°>

And my code returns these Eulers:

<18.5804°, 81.0106°, 19.6844°>

At first glance, they're nothing alike. However, if we study them more, we'll find that the second set is the same as the first set, with just some 180° offsets.

Therein lies my dilemma. Is there an order here I'm missing? I really need to get the exact same results as this vetted software.

I would provide some extra code, but I think that brings in complexity that's not necessary. Hopefully I've explained the problem adequately.

Thanks In Advance,
Elroy
elroy is offline  
 
July 13th, 2017, 03:08 AM   #2
Global Moderator
 
Joined: Dec 2006

Posts: 17,533
Thanks: 1322

If you get different Euler angles, you're using different definitions.
skipjack is offline  
July 13th, 2017, 03:14 AM   #3
Senior Member
 
Joined: Apr 2014
From: Glasgow

Posts: 2,021
Thanks: 666

Math Focus: Physics, mathematical modelling, numerical and computational solutions
Quote:
Originally Posted by elroy View Post
To expound some more, I'm trying to write some code that emulates some other extremely vetted code (to which I don't have the source). The vetted code returns these Eulers between two bases:

<-161.4196° 98.9894° -160.3156°>

And my code returns these Eulers:

<18.5804°, 81.0106°, 19.6844°>

At first glance, they're nothing alike. However, if we study them more, we'll find that the second set is the same as the first set, with just some 180° offsets.

Therein lies my dilemma. Is there an order here I'm missing? I really need to get the exact same results as this vetted software.
I've never heard of "Euler" being used as a noun for anything. I think what you're probably referring to are rotational transformations which, in Unity for example, can be set by specifying a vector representing an axis and an "Euler angle". The reason for this name is to distinguish it from quaternions, angles which use a different set of mathematics to perform rotational transforms.

The order of a set of rotations matter, so the angles you are obtaining by doing different rotations will be different. I would have to take a look at your code to see what you're trying to do and diagnose any difficulties (which I don't have time for right now unfortunately), but perhaps you're doing some 180 degree rotations because the angles you have in the second set can be obtained by either adding or subtracting 180 degrees from the angles in the first set. Chances are you're not far off.

If you're trying to reverse engineer a function that returns angles, you also need to be careful about which quadrants the arcsin, arccos and arctan functions are returning.
Benit13 is offline  
Reply

  My Math Forum > College Math Forum > Linear Algebra

Tags
bases, eulers, extracting, ordered



Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Eulers Method harley05 Differential Equations 1 April 1st, 2015 06:51 AM
eulers constant mathbalarka Number Theory 15 May 30th, 2012 10:20 PM
Easy method of Extracting the square roots of Any Number Sirjon Algebra 0 September 1st, 2010 06:17 PM
Extracting sine wave info from few samples MCU problem The HitchHiker Computer Science 0 August 18th, 2008 01:12 AM
Extracting sine wave info from few samples problem The HitchHiker Complex Analysis 0 August 18th, 2008 01:08 AM





Copyright © 2017 My Math Forum. All rights reserved.