Author Topic: Directions  (Read 3593 times)

mirex

  • *
  • Posts: 1645
    • View Profile
    • http://mirex.mypage.sk
Directions
« on: 2002-09-26 11:25:07 »
One technical question here. Let there be a 3d coordinate system with axes x,y,z. Which way is up, front, left and so on ?

I think it is like Z+ = up, X+ = forward, Y+ = left; but im not sure if it is ok. Because I've seen also a system with Y- = up (it does not make any sense to me).

And also, how about rotations in this system, where is 'direction zero', and how should rotations be performed ?
(My opinion: zero = X+, Heading = XYplane, Y+=90; Pitch = XZ, Z+ = 90; Roll = YZ, Y- = 0, Z+ = 90; order of rotations is Roll Pitch Heading )

Aaron

  • *
  • Posts: 2818
    • View Profile
    • http://aaron-kelley.net/
Directions
« Reply #1 on: 2002-09-26 12:16:20 »
I think that usually, X is left-right, Y is up-down, and Z is forward-back.  Not sure.

Alhexx

  • *
  • Posts: 1894
    • View Profile
    • http://www.alhexx.com
Directions
« Reply #2 on: 2002-09-26 12:20:22 »
I think it depends on which coordinate system you are using.
In our "normal" coord systems, it *should* be like Aaron said:
X: left/right
Y: up/down
Z: forward/back

In a mathematical coord system, I think it is as you said, mirex...

However, not sure after all...

 - Alhexx

Qhimm

  • Founder
  • *
  • Posts: 1996
    • View Profile
    • Qhimm.com
Directions
« Reply #3 on: 2002-09-26 12:25:53 »
In a "standard" right-oriented coordinate system, x+ is right, y+ is up, and z+ is towards you. Right-oriented means that if you walk from X+ to Y+ to Z+, you will move counter-clockwards. This is the normal mathematical coordinate system, but as you can see, your suggested coordinate system is also right-oriented (a rotated version of the standard). Usually 3D engines use the standard, but then again it doesn't really matter since you can simply rotate the camera and voila!, things move like your coordinate system.

By "direction zero", I'm guessing you're asking which way the default view is oriented if you feed a 3D engine (0,0,0) as rotation values. This I do not know, but if you're looking at the above-mentioned coordinate system, you're looking into Z-.

Rotations (pitch,yaw,roll) would then be defined as follows: pitch = rotation around X, yaw (heading) = rotation around Y, and roll = rotation around Z. Positive rotation would be defined as counter-clockwise movement if you saw it from the positive side of the axis. But as I said, rotation "zero" is just a matter of definition, so I guess it depends on the 3D engine.

Nori

  • *
  • Posts: 792
    • View Profile
Tee Hee
« Reply #4 on: 2002-09-26 14:13:06 »
Ahhh reminds me of Calculus 3...
*depends on which coordinate*

mirex

  • *
  • Posts: 1645
    • View Profile
    • http://mirex.mypage.sk
Directions
« Reply #5 on: 2002-09-27 12:31:36 »
Ok ppl, so if you all say Y is up then I'll use it. I dont know why I got used to Z+ = up.

Thank you all !  :wink: