Euler Angles vs. Angles
RigidChips :: Rigid-Chips :: Tutorials :: Request a Tutorial
Page 1 of 1 • Share •
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)

fredsmith- Hover

- Posts: 109
Join date: 2011-01-19
Location: Nowhere and everywhere.

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.
_________________
Previously (and currently) known as Juz.
Please do not write "LUA", beause it's "Lua". It's Moon in Portuguese, not a Limited User Account, Last Universal Ancestor, or the Lukla Airport in Nepal.
JHaskly- Admin
- Posts: 235
Join date: 2010-07-16
Age: 16
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);

fredsmith- Hover

- Posts: 109
Join date: 2011-01-19
Location: Nowhere and everywhere.

Re: Euler Angles vs. Angles
I wouldn't have done that. Too much code 
- Code:
-_EX(chip)*math.sgn(_ZZ(chip))
_________________
Previously (and currently) known as Juz.
Please do not write "LUA", beause it's "Lua". It's Moon in Portuguese, not a Limited User Account, Last Universal Ancestor, or the Lukla Airport in Nepal.
JHaskly- Admin
- Posts: 235
Join date: 2010-07-16
Age: 16
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().
_________________
A.K.A. Bernard
bwansy- Admin
- Posts: 158
Join date: 2010-07-15

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

fredsmith- Hover

- Posts: 109
Join date: 2011-01-19
Location: Nowhere and everywhere.

Re: Euler Angles vs. Angles
Thanks.

fredsmith- Hover

- Posts: 109
Join date: 2011-01-19
Location: Nowhere and everywhere.

Re: Euler Angles vs. Angles
JHaskly wrote:I wouldn't have done that. Too much code
- Code:
-_EX(chip)*math.sgn(_ZZ(chip))
Yeah, that's what I used in my update Lua library (never released because I didn't think anyone would use it)
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.
_________________
mov ah,9
mov dl,msg
int 21h
int 20h
msg db "lolol",36h

Chris220- Moderator
- Posts: 58
Join date: 2010-07-15
Age: 19
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. 

fredsmith- Hover

- Posts: 109
Join date: 2011-01-19
Location: Nowhere and everywhere.

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
_________________
mov ah,9
mov dl,msg
int 21h
int 20h
msg db "lolol",36h

Chris220- Moderator
- Posts: 58
Join date: 2010-07-15
Age: 19
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. 

fredsmith- Hover

- Posts: 109
Join date: 2011-01-19
Location: Nowhere and everywhere.

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: 68
Join date: 2010-10-24
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: 319
Join date: 2010-10-12
Age: 17
Location: Brazil
Re: Euler Angles vs. Angles
I play algodoo too same username

freek4ever- Tank

- Posts: 92
Join date: 2011-08-26
Age: 15
Location: nederland holand
Similar topics» Euler Angles vs. Angles
» Changing Cutscene Camera Angles?
» BBC camera angles
» 1250 Blood Angels Jump Pack Army
» New player and Starting Blood Angels
» Changing Cutscene Camera Angles?
» BBC camera angles
» 1250 Blood Angels Jump Pack Army
» New player and Starting Blood Angels
RigidChips :: Rigid-Chips :: Tutorials :: Request a Tutorial
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum