Re: 3D coordinate system with Z=Up - rotation directions and starting axis ?
Paul <[email protected]>
| Newsgroups | comp.os.ms-windows.programmer.win32,alt.comp.os.windows-xp,alt.windows7.general |
|---|---|
| Organization | A noiseless patient Spider |
| Message-ID | <[email protected]> |
On Sun, 1/26/2025 2:13 AM, R.Wieser wrote:
> Hello all,
>
> I've used OpenGL to create a basic 3D coordinate system (which works) with
> Z=Up, X=to the right and Y=into the screen.
>
> The thing is that I've picked rotation directions and starting axis for
> those rotations in a "I need it to work, and this does" way. :-|
>
> Now I'm at a point where I want to make it conform to a/the standard, and
> have done a few websearches for 3D coodinate systems and their specifics.
>
> Alas, although I've been able to find pictures of the Y=Up and Z=Up
> coordinate systems and even a Z=up, rotation=anti-clockwise description
> (right-hand rule), I could not find anything more - which suprises me to be
> honest. :-|
>
>
>
> What I'm looking for, for both the Y=up and Z=Up coordinate systems :
>
> rotation directions for all three axis/planes, as well as starting axis*.
>
> * Although I've found that for Z=Up the rotation direction is
> counter-clockwise I do not know at with axis it starts: +X ? +Y ?
> Perhaps -X or -Y ?. No idea. :-(
>
> Regards,
> Rudy Wieser
>
>
https://www3.ntu.edu.sg/home/ehchua/programming/opengl/CG_BasicsTheory.html
3. Vertices, Primitives, Fragment and Pixels
3.1 3D Graphics Coordinate Systems
OpenGL adopts the Right-Hand Coordinate System (RHS). In the RHS, the x-axis
is pointing right, y-axis is pointing up, and z-axis is pointing out of the screen.
With your right-hand fingers curving from the x-axis towards the y-axis,
the thumb is pointing at the z-axis. RHS is counter-clockwise (CCW).
The 3D Cartesian Coordinates is a RHS.
Some graphics software (such as Microsoft Direct3D) use Left-hand System (LHS),
where the z-axis is inverted. LHS is clockwise (CW).
In this article, we shall adopt the RHS and CCW used in OpenGL.
*******
Try it their way and see if it works ?
https://www3.ntu.edu.sg/home/ehchua/programming/opengl/images/Graphics3D_RHS.png
Paul