• OT - right-handed 3D world : where is direction zero looking toward ?

    From R.Wieser@21:1/5 to All on Thu Aug 17 14:51:07 2023
    Hello all,

    I've got a 3D world using the right-handed coordinate system with X to the right, Y up and Z outof the screen, the horizontal direction going counter-clockwise over the Y axis, and the vertical direction also counter-clockwise over the X axis.

    My question is, where are both rotations starting ? Currently I have
    looking over the negative Z axis as zero for both (conforming with the direction I look in when looking at the screen).

    The thing is, I could easily imagine someone regarding the X axis as the
    most important one (making my horizontal direction -90 degrees) and possibly having straight up as zero degrees (making my vertical direction +90
    degrees).

    tl;dr:
    Whats the convention in regard to where both the horizontal and vertical directions start ?

    Regards,
    Rudy Wieser

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paul@21:1/5 to R.Wieser on Thu Aug 17 15:48:00 2023
    On 8/17/2023 8:51 AM, R.Wieser wrote:
    Hello all,

    I've got a 3D world using the right-handed coordinate system with X to the right, Y up and Z outof the screen, the horizontal direction going counter-clockwise over the Y axis, and the vertical direction also counter-clockwise over the X axis.

    My question is, where are both rotations starting ? Currently I have looking over the negative Z axis as zero for both (conforming with the direction I look in when looking at the screen).

    The thing is, I could easily imagine someone regarding the X axis as the
    most important one (making my horizontal direction -90 degrees) and possibly having straight up as zero degrees (making my vertical direction +90 degrees).

    tl;dr:
    Whats the convention in regard to where both the horizontal and vertical directions start ?

    Regards,
    Rudy Wieser

    I was a little bit surprise about how the angle is measured and
    what the zeroth axis is.

    https://upload.wikimedia.org/wikipedia/commons/thumb/4/4f/3D_Spherical.svg/1200px-3D_Spherical.svg.png?sa=X&ved=2ahUKEwj9mYmpueSAAxVhCTQIHdrSDpcQ_B16BAgEEAI

    Here is the full article.

    https://en.wikipedia.org/wiki/Spherical_coordinate_system

    Paul

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From R.Wieser@21:1/5 to All on Fri Aug 18 10:27:36 2023
    Paul,

    I was a little bit surprise about how the angle is measured and
    what the zeroth axis is.
    [snip image]

    I'm sorry, but that image tells me nothing about what I am looking for.
    Just how that "x" point is oriented related to the two axis nearest to it.
    IOW, they might well be an arbitrary choice (if the X coordinate would be negative would phi become larger than 90 degrees, or would it be measured
    from the negative X axis ? If the Z coordinate would be smaller, would
    theta than described as over 45 degrees, or would it than be measured from
    the horizontal plane ?).

    Yes, I know nothing about any kind of convention in that regard. Not even
    if there is one and/or if its applicable to that image. :-(

    Also, its shows a Z=up space not related to anything, while mine is a Y=up space related to a computers screen, andI'm not at all sure that that difference doesn't change anything ...

    Here is the full article.
    [snip link]

    I've tried to read and understand it, but not even the "Conventions" chapter
    is specific about it :

    "where the "zenith" direction is north and positive azimuth (longitude)
    angles are measured eastwards *from some prime meridian*. "

    (emphasis mine)

    Besides that I would need to assume that a meridian (as used on a spherical thing like our earth) may be considered to be the same as an axis in a flat (computer game) world, my largest problem is that I do not see anything
    about what that "prime meridian" than might be. :-|

    ... or at least, I do not recognise anything as such.

    Regards,
    Rudy Wieser

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paul@21:1/5 to R.Wieser on Fri Aug 18 08:08:27 2023
    On 8/18/2023 4:27 AM, R.Wieser wrote:
    Paul,

    I was a little bit surprise about how the angle is measured and
    what the zeroth axis is.
    [snip image]

    I'm sorry, but that image tells me nothing about what I am looking for.
    Just how that "x" point is oriented related to the two axis nearest to it. IOW, they might well be an arbitrary choice (if the X coordinate would be negative would phi become larger than 90 degrees, or would it be measured from the negative X axis ? If the Z coordinate would be smaller, would theta than described as over 45 degrees, or would it than be measured from the horizontal plane ?).

    Yes, I know nothing about any kind of convention in that regard. Not even
    if there is one and/or if its applicable to that image. :-(

    Also, its shows a Z=up space not related to anything, while mine is a Y=up space related to a computers screen, andI'm not at all sure that that difference doesn't change anything ...

    Here is the full article.
    [snip link]

    I've tried to read and understand it, but not even the "Conventions" chapter is specific about it :

    "where the "zenith" direction is north and positive azimuth (longitude) angles are measured eastwards *from some prime meridian*. "

    (emphasis mine)

    Besides that I would need to assume that a meridian (as used on a spherical thing like our earth) may be considered to be the same as an axis in a flat (computer game) world, my largest problem is that I do not see anything
    about what that "prime meridian" than might be. :-|

    ... or at least, I do not recognise anything as such.

    Regards,
    Rudy Wieser

    I don't know if I can work this backwards, any more than I have :-)

    There are matrix maths for converting between spaces, and
    the equations involve a matrix, where various elements are
    populated by cos() and sin() [trig equations].

    Your choices of labeling are not arbitrary, if you expect to
    use someone elses library of coordinate transforms.

    The first question is, can you take the Wiki diagram and rotate
    it so it overlays your Y-up diagram ? If so, then the measurement
    of Theta and Psi are in the diagram and that's how you measure them.
    You use the matrix maths, pick a test point in space, do the
    transform, does the (r,theta,psi) tuple make sense or not ?

    That's how I do maths. I do symbolic manipulation. But then I test.
    I see whether the results make "intuitive sense". I swallow my
    sense of unreality, if the transforms test and work.

    Paul

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From R.Wieser@21:1/5 to All on Fri Aug 18 17:35:06 2023
    Paul,

    Your choices of labeling are not arbitrary, if you expect to
    use someone elses library of coordinate transforms.

    I know. And thats all my question is about.

    I'm not going to assume that /everyone/ uses a certain convention, but would like to conform to the most common one.

    The first question is, can you take the Wiki diagram and rotate
    it so it overlays your Y-up diagram ?

    Ofcourse.

    If so, then the measurement of Theta and Psi are in the diagram and that's how
    you measure them.

    (I take it you mean phi, not psi)

    If I rotate Phi and Theta too it becomes meaningless. If I don't the new
    axis they are measured from become arbitrary.

    But then I test. I see whether the results make "intuitive sense".

    That is why I defined both to start at the negative Z axis. Very intuitive when imagining the camera being an aeroplane. Set both Phi (yaw) and Theta (pitch) at zero, apply a bit of speed and you're going forward.

    I swallow my sense of unreality, if the transforms test and work.

    I did the same and it does.

    ... But that wasn't my question. :-(

    Regards,
    Rudy Wieser

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paul in Houston TX@21:1/5 to R.Wieser on Sat Aug 19 12:21:48 2023
    R.Wieser wrote:
    Hello all,

    I've got a 3D world using the right-handed coordinate system with X to the right, Y up and Z outof the screen, the horizontal direction going counter-clockwise over the Y axis, and the vertical direction also counter-clockwise over the X axis.

    My question is, where are both rotations starting ? Currently I have looking over the negative Z axis as zero for both (conforming with the direction I look in when looking at the screen).

    The thing is, I could easily imagine someone regarding the X axis as the
    most important one (making my horizontal direction -90 degrees) and possibly having straight up as zero degrees (making my vertical direction +90 degrees).

    tl;dr:
    Whats the convention in regard to where both the horizontal and vertical directions start ?

    Regards,
    Rudy Wieser
    There are likely hundreds of coord system variants all using an
    arbitrary zero point. It sounds like you are using some sort of 3D
    Cartesian system. The zero point is up to you... or to the creator of
    what ever program you are using.
    Spherical coords are good for spheres. Cart is good for planar
    surfaces. Multi-Elliptical good for GPS (which is converted to lat/long
    Cart for consumer use). Lat/long zeros (x,y,z) are prime
    meridian/equator/sea level OR center of the earth. I use Cart 3D in my
    work since the map segments are local and either from an arbitrary zero
    point or from GPS data. I'm not worried about taking into account the spherical curvature of the earth's surface.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From R.Wieser@21:1/5 to All on Sat Aug 19 22:35:26 2023
    Paul (Houston),

    It sounds like you are using some sort of 3D Cartesian system.

    Yep. Just bog-standard 3D coordinates. Rotations about the three axis are also bog-standard.

    Though its not about the coordinates, but how I describe a direction from
    one 3D coordinate to another using yaw and pitch (or inclination and
    azimuth). As my camera is looking over the negative Z axis I took it as
    the starting point for both angles.

    Though I can imagine that developers of 3D game worlds use (a) different starting point(s), and would like to know if there is a most-used set of starting axis and CW/CCW rotation around them. Thats all.

    Regards,
    Rudy Wieser

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)