• moderatecentrist@feddit.uk
    link
    fedilink
    English
    arrow-up
    2
    ·
    11 hours ago

    For me it’s the top one. In a web browser, when using CSS and JavaScript, x is the horizontal axis, y is the vertical axis, and z is for depth. Hence the z-index CSS property which determines depth.

    I would say the bottom one only makes sense if the stick figure were to hover in the air and look downwards. Then the z axis would be depth for him.

  • JigglySackles@lemmy.world
    link
    fedilink
    arrow-up
    30
    ·
    1 day ago

    Z is elevation. Any real world application, z goes up down. 3D applications SHOULD use it for elevation. I despise that many do not. It’s so fucking confusing. 2D, sure y go brrr. But once that 3rd dimension is added, y needs to take several seats and quit trying to take on dimensions it doesn’t have any right to.

    • SkunkWorkz@lemmy.world
      link
      fedilink
      arrow-up
      5
      ·
      12 hours ago

      Y-up sorta makes sense in games. Imagine a 2D platformer, Y is up and X is horizontal. Now add depth. Instead of flipping axis just use Z for depth.

        • SkunkWorkz@lemmy.world
          link
          fedilink
          arrow-up
          1
          ·
          12 hours ago

          True but I think it’s also because of screen coordinates, Y is always the vertical axis in screen coordinates. So programmers translated that to 3D coordinates because in real world space the screen doesn’t lie flat but is up right. It’s probably why Y is up in OpenGL and calls the depth buffer the Z-Buffer.

      • JigglySackles@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        9 hours ago

        That’s the core of my point though. Once you add depth it’s not 2d space anymore (even though the screen is 2d, the represented field is 3D) and y becomes depth.

        • SkunkWorkz@lemmy.world
          link
          fedilink
          arrow-up
          1
          ·
          9 hours ago

          It all depends how you perceive the XY plane. Like if your job involves blueprints than XY plane lies flat and horizontal then it makes sense that Z axis is height. Hence why engineering software is all Z-Up. If the XY plane is upright, like screen coordinates, then Z is depth. Hence why many software that is used to create content for the screen is Y-Up. Like Maya, Houdini, Unity, OpenGL etc.

    • unphazed@lemmy.world
      link
      fedilink
      arrow-up
      5
      ·
      19 hours ago

      It makes more sense if you’ve ever drawn in CAD. Top view, x and y. Now side view, y and z or y and x. You look down on x and y, and if you are extruding you now create the z axis dimensions. For the people who draft on the side axis: you are true psychos (ok, unless you’re using a lathe I suppose, or if the silhouette is more defined from the side… ok maybe not psycho, just odd)

      • JigglySackles@lemmy.world
        link
        fedilink
        arrow-up
        2
        ·
        15 hours ago

        I do use CAD software but always have my items resting on an x/y plane with z being height. I do some 3d printing and basic cad designs, so z being elevation still makes sense there.

      • BanMe@lemmy.world
        link
        fedilink
        arrow-up
        3
        ·
        19 hours ago

        User look sideways at item on shelf. Designers look down on paper. Both viewpoints are needed for it to be a good object.

        Architects do both because they have all that math and something serious to prove.

  • khepri@lemmy.world
    link
    fedilink
    arrow-up
    12
    arrow-down
    1
    ·
    1 day ago

    Z is depth, full stop, and I have my fists raised, Queensbury-style, to anyone who contends otherwise.

    • rami@ani.social
      link
      fedilink
      English
      arrow-up
      2
      ·
      14 hours ago

      I’m came here to talk shit about y-up but now I’m mad at you instead.

  • m0darn@lemmy.ca
    link
    fedilink
    arrow-up
    7
    ·
    1 day ago

    Right handed and left handed? (Top image doesn’t follow right hand rule, Z should point towards camera)

  • mad_lentil@lemmy.ca
    link
    fedilink
    English
    arrow-up
    8
    ·
    1 day ago

    Above and below the page/plane is the z-axis.

    But some people “hold” the page up in front of them, or down on the table.

    • Buddahriffic@lemmy.world
      link
      fedilink
      arrow-up
      3
      ·
      1 day ago

      My “page” is my monitor’s screen, a window into many virtual worlds that extend past the plane of my screen.

      Actually, my screen is a curved surface. So the 3d virtual world is projected onto a 2d plane which is then projected back onto a 3d curved screen. The math to make it look correct in the final projection is different from what makes it look correct on a flat screen, though I don’t know if any renderers actually do this correction. Not that I think the difference is huge.

  • Spacehooks@reddthat.com
    link
    fedilink
    English
    arrow-up
    9
    arrow-down
    1
    ·
    1 day ago

    Weird didn’t everyone learn XY on paper on a desk first? All they did was add z axis to that original concept for elevation which gives us the bottom image.

    Top image is like if I held paper straight parallel to my face.

    • SkunkWorkz@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      12 hours ago

      Screens vs paper. It’s why all the engineering software uses Z-up, since they came from a paper top-down view workflow. But many of the creative software uses y-up, since they exist to create art that gets consumed on a screen. Like animation and games.

      • Spacehooks@reddthat.com
        link
        fedilink
        English
        arrow-up
        1
        ·
        11 hours ago

        Blender and UE4 uses z as up. Which was intuitive to me having been taught that in school but Looks like industry standard for 2d focused engines use Y up based on this comment from 2009. What a mess.

        Maya and Unity both use the lefthand axis system which has Y as world up. Max is the one of the few that uses Z as up (DOH!!)

        2022 comment:

        Maya is fully able to translate between its own (Y up) and UE4’s (Z up) on export, so you can work “upright” in both without any alterations.

    • e0qdk@reddthat.com
      link
      fedilink
      arrow-up
      1
      ·
      18 hours ago

      didn’t everyone learn XY on paper on a desk first?

      No. I was plugging in crazy combinations of r, theta, x, y, z, t, and anything else shown in the built-in demo of that old Mac 3D graphing calculator app years before my teachers got to explaining coordinate systems. I had no idea what most of it meant, but I could make cool looking animated graphics as a third grader…

      Also, I found GameMaker which introduced me to using X to the right and Y down in 2D (with the origin in the top-left corner) before algebra was taught to me in school…

    • homura1650@lemmy.world
      link
      fedilink
      arrow-up
      10
      ·
      1 day ago

      When working in 2 dimensions with gravity, it is common to treat Y as up. E.g, 2d video games, physics problems, computer screens.

    • squaresinger@lemmy.world
      link
      fedilink
      arrow-up
      8
      ·
      1 day ago

      That’s basically what it comes down to: Is your XY plane a piece of paper that you look at from the top, or is it the pixel coordinates of the screen you are looking through?

      That’s why X is usually not contested, because it’s the same on a piece of paper that you view top-down and on a screen that you view from the front.

      Y is then one of the two potential axies for either a top-down or a side-scrolling view, and Z is the remaining axis.

      • Spacehooks@reddthat.com
        link
        fedilink
        English
        arrow-up
        1
        ·
        11 hours ago

        I not educated in 2d game design so I guess Y is used for up on side strollers is what I think is happening. Least thats what is going on in gadot based on anothet commenter.

        • squaresinger@lemmy.world
          link
          fedilink
          arrow-up
          2
          ·
          9 hours ago

          In 2D games X is right, Y is either up or down. I haven’t seen any engine where X is inverted, but Y can be either direction. Interestingly, I haven’t seen Y as down in any 3D environment yet.

    • jaupsinluggies@feddit.ukBanned
      link
      fedilink
      arrow-up
      4
      ·
      1 day ago

      Well no. First the teacher drew it on the board, hence Y pointing up at the ceiling.

      Then we switched to paper and discovered Y pointing somewhere else was somehow the same thing.

      So the right answer to the OP is probably that “they’re the same picture” meme.

  • solomonschuler@lemmy.zip
    link
    fedilink
    arrow-up
    7
    arrow-down
    1
    ·
    1 day ago

    No, just no. x is the variable for depth, y is the variable for width, and z is height. I learned that from multivariable calculus, no other convention is better.

    Fuck you for showing me this, I’m now going to gauge my eyes out.