Euler Angles vs. Angles
+3
bwansy
JHaskly
fredsmith
7 posters
RigidChips :: Rigid-Chips :: Tutorials :: Request a Tutorial
Page 1 of 1
Euler Angles vs. Angles
First thing, is it true that:
1. _AX() is buggy
2. _AX(), _AY(), and _AZ() are deprecated, and therefore we should avoid using them
If those are true, it follows that we should be using Euler angles instead (like the English Documentation tells us to), right?
Therefore, we either need function(s) that can convert between those two, or a tutorial explaining Euler angles. (I myself have no idea about Euler angles, even after reading the Wiki article)
1. _AX() is buggy
2. _AX(), _AY(), and _AZ() are deprecated, and therefore we should avoid using them
If those are true, it follows that we should be using Euler angles instead (like the English Documentation tells us to), right?
Therefore, we either need function(s) that can convert between those two, or a tutorial explaining Euler angles. (I myself have no idea about Euler angles, even after reading the Wiki article)
Re: Euler Angles vs. Angles
2. I don't really think that "deprecated" matters. It's not like they are going to be phased out in a later version
1. I'm not sure about this, as I don't use _AX
I'm not actually sure that there is a difference. If there is, Bwansy should be able to explain it
However, _EX is also not quite suitable as it is. If the model is facing south, it inverts (I think it's south...). But this can easily be rectified.
1. I'm not sure about this, as I don't use _AX
I'm not actually sure that there is a difference. If there is, Bwansy should be able to explain it
However, _EX is also not quite suitable as it is. If the model is facing south, it inverts (I think it's south...). But this can easily be rectified.
JHaskly- Admin
- Posts : 235
Join date : 2010-07-16
Age : 28
Location : Brisbane
Re: Euler Angles vs. Angles
LOL Okay then... I'll wait for Bwansy to reply. XD
EDIT: Okay, looking at Chris220's Lua library, we find that he fixed _EX() by doing this:
In his library documentation, this is what it says...
EDIT: Okay, looking at Chris220's Lua library, we find that he fixed _EX() by doing this:
- Code:
function ex(chipNum)
if(-math.pi<=_EY(chipNum) and _EY(chipNum)<=-math.pi/2) or (math.pi/2<=_EY(chipNum) and _EY(chipNum)<=math.pi) then
local ex = -_EX(chipNum)
return ex
else
local ex = _EX(chipNum)
return ex
end
end
In his library documentation, this is what it says...
ex() documentation wrote:Format:
ex(chipNum);
Description:
Outputs the euler X radian. Fixed bug of _EX() being reversed when model is rotated 180 degrees.
Example:
local EulerX = ex(CORE);
Re: Euler Angles vs. Angles
I wouldn't have done that. Too much code
- Code:
-_EX(chip)*math.sgn(_ZZ(chip))
JHaskly- Admin
- Posts : 235
Join date : 2010-07-16
Age : 28
Location : Brisbane
Re: Euler Angles vs. Angles
According to the Japanese documentations, _EX/Y/Z() are the same as _AX/Y/Z(), but "optimised and works faster", but both are buggy. I can't tell for now exactly how _AX() is buggy, because like Juz, I've seldom used _AX/Y/Z(). And Juz is right about how to fix _EX().
Re: Euler Angles vs. Angles
Okay, thank you.
EDIT: Wait, so it's
EDIT: Wait, so it's
- Code:
function ex(chip)
return -_EX(chip)*math.sgn(_ZZ(chip))
end
Re: Euler Angles vs. Angles
Yeah, that's what I used in my update Lua library (never released because I didn't think anyone would use it)JHaskly wrote:I wouldn't have done that. Too much code
- Code:
-_EX(chip)*math.sgn(_ZZ(chip))
The fix posted above was something I set up years ago, I think bwansy may have helped out with it
The best thing to use for a lot of cases, especially with 3D physical applications, is quaternion angles. They're a bit confusing to learn about at first, but relatively simple if you understand them. The reason they're so useful is that, due to their nature, they avoid the issue of the gimbal lock.
Chris220- Moderator
- Posts : 58
Join date : 2010-07-15
Age : 31
Location : Right behind you
Re: Euler Angles vs. Angles
LOL well... I'm still taking my time learning physics... most of the stuff here is already beyond what I'm learning at school: I'm in Physics 12. I haven't even graduated from high school yet.
Re: Euler Angles vs. Angles
It's always nice to teach yourself extra stuff outside of school, means when you get round to studying it it's really easy!
Take vector dot products for example. I've been using the dot product for ages now, for various things in my programming. I've only JUST started learning about it at college (I'm 18)
I dunno why they left it so late - it's really easy xD
Take vector dot products for example. I've been using the dot product for ages now, for various things in my programming. I've only JUST started learning about it at college (I'm 18)
I dunno why they left it so late - it's really easy xD
Chris220- Moderator
- Posts : 58
Join date : 2010-07-15
Age : 31
Location : Right behind you
Re: Euler Angles vs. Angles
Yes, I agree haha, it's awesome to learn extra stuff when you have the time. It's also great to apply something you just learned in school to RC and other physics games.
Re: Euler Angles vs. Angles
Personally, I prefer quaternions.
I remember testing AX()... and them not being the same. I could be wrong though.
I remember testing AX()... and them not being the same. I could be wrong though.
DanielLC- Tank
- Posts : 78
Join date : 2010-10-23
Re: Euler Angles vs. Angles
i don't think that relates to the topic at all.
BTW i play algodoo too!
BTW i play algodoo too!
RA2lover- Walker
- Posts : 382
Join date : 2010-10-11
Age : 29
Location : Brazil
Re: Euler Angles vs. Angles
I play algodoo too same username
freek4ever- Tank
- Posts : 97
Join date : 2011-08-26
Age : 27
Location : nederland holand
RigidChips :: Rigid-Chips :: Tutorials :: Request a Tutorial
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum