• Hadriscus@jlai.lu
              link
              fedilink
              arrow-up
              4
              ·
              2 months ago

              Personally I feel limited if I’m working in anything else than a non-euclidean coordinate system

                • Hadriscus@jlai.lu
                  link
                  fedilink
                  arrow-up
                  1
                  ·
                  2 months ago

                  ah ! well. I don’t use any of the programs that are left handed so I can’t say I’ve ever had to struggle with I/O shenanigans, if that’s what you’re talking about. But you’re leaving me guessing, so not sure what else I can say

          • dustyData@lemmy.world
            link
            fedilink
            English
            arrow-up
            11
            ·
            2 months ago

            Tradition, 3d videogames started doing it like that because of how computers worked 40 years ago, then devs got used to think about 3d space that way and it stuck. Essentially videogames think about visual depth. And yes, the physics engines for videogames usually account for that and use their own transformations of formulas because they are rarely simulating anything more complex than rigid body physics. Advanced simulations aren’t any harder for devs, all the transformations are abstracted away with libraries.

            In the end they are just reference frames and up is whatever you want it to be. As Wikipedia puts it eloquently: “Unlike most mathematical concepts, the meaning of a right-handed coordinate system cannot be expressed in terms of any mathematical axioms. Rather, the definition depends on chiral phenomena in the physical world, for example the culturally transmitted meaning of right and left hands, a majority human population with dominant right hand, or certain phenomena involving the weak force.”

              • dustyData@lemmy.world
                link
                fedilink
                English
                arrow-up
                4
                ·
                2 months ago

                Not really. Youtuber Acerola has a great series on shader programming and dealing with negative numbers is a non-factor. The advantage of working with computers is that it abstracts that complexity away. You program with high level concepts, a dev rarely deals with direct calculations, unless they are actually writing the fundamental apis for it, like DX or Vulkan. Much less copy-paste formulas. It gets complicated fast, but the abstraction keeps it simple for the developer, like, the math is perhaps the easiest part of programming computer graphics.

        • BarqsHasBite@lemmy.world
          link
          fedilink
          arrow-up
          3
          ·
          2 months ago

          I’m not getting left handed vs right handed. Right handed means negative values go right? Why would anyone do that?

          • grue@lemmy.world
            link
            fedilink
            arrow-up
            7
            ·
            2 months ago

            Right handed means that when you curl the fingers on your right hand from +X towards +Y, your thumb points towards +Z.

          • mumblerfish@lemmy.world
            link
            fedilink
            arrow-up
            4
            ·
            2 months ago

            Someone else was explaining how to tell left from right handed. Buy why is it important? If you do math and physics, you almost certainly would use a right hand system. That means all formulas are derived with that in mind. If you try to use them in the left handed system, you are going to have a horrible time trying to figure out which of all terms need to have their sign flipped.

          • Pennomi@lemmy.world
            link
            fedilink
            English
            arrow-up
            2
            ·
            2 months ago

            Eh sort of? It’s all a matter of perspective. In Blender which uses a right hand system, when you view from the side, right is positive Y, up is positive Z, and towards the user is positive X.

            But looking from above, positive X is right, positive Y is up, and positive Z is towards the camera. Obviously if you rotate the camera to be viewing from the negative side of the axis some directions get flipped.

            Basically if you’re axis aligned, things work out the way you would expect.

  • etuomaala@sopuli.xyz
    link
    fedilink
    arrow-up
    38
    ·
    2 months ago

    I legit had no idea anybody actually used the upper system until now. I had to read the comments just to see whether the upper system was just some sort of joke. I am horrified.

  • mr_account@lemmy.world
    link
    fedilink
    arrow-up
    29
    ·
    2 months ago

    One of my friends and I used to always have this debate because of our different backgrounds. I got used to +Y being up because of doing physics for several years and seeing side-on diagrams that needed to account for gravity. My friend has a background in geology, so he’s used to top-down surveying maps where +Z is up. It all depends on your perspective.

    But my way is right. We need to have standards, people.

    • driving_crooner@lemmy.eco.br
      link
      fedilink
      arrow-up
      16
      ·
      2 months ago

      If 2d, Y up, if 3d Z up.

      I always tough as inputs down, answer up. And usually, x is the variable y the result, or xy the variables and z the result

      • Sir_Premiumhengst@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        2 months ago

        Oh. Agree, also use the same convention; my brain never made the connection f(i, j) goes up and i and j are inputs and stay down.

  • loie@lemmy.world
    link
    fedilink
    arrow-up
    19
    ·
    2 months ago

    In my brain Z is Up, Z is Height. In my job I have to deal with both all the time which is quite annoying.

  • L0rdMathias@sh.itjust.works
    link
    fedilink
    arrow-up
    18
    ·
    2 months ago

    Z is always depth. Both are correct but define different perspectives. Top is looking across the landscape from an arbitrary floating perspective, bottom is looking down with anchored mapping to the surface.

    • juliebean@lemmy.zip
      link
      fedilink
      arrow-up
      4
      ·
      2 months ago

      yep. in 2 dimensions, nobody really debates on whether x or y should point up, so i kinda think the debate about z stems from whether one thinks we should put the xy plane horizontally (like a sheet of paper on a desk), or vertically (like a chalkboard).

      does any software default to making x be the vertical axis?

    • isar@lemmy.ml
      link
      fedilink
      arrow-up
      3
      ·
      2 months ago

      Smh I was fine with both. The upper one reminded me of the X Y axis we use to represent functions in maths. While the lower one represents altitude on a 3D map.

      • Smoogs@lemmy.world
        link
        fedilink
        English
        arrow-up
        2
        ·
        2 months ago

        Spent most my life working in a 3d environment… need to reverse that thing for a controller every single time

    • ModCen@feddit.uk
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 months ago

      Good answer. Many posts are people saying “my approach is the right one, other people are irredeemable morons who should burn in hell”, but you’re right, it depends on your perspective.

  • KSP Atlas@sopuli.xyz
    link
    fedilink
    arrow-up
    18
    ·
    2 months ago

    y-up ftw

    It’s easier when writing 3d renderers cause the x and y coordinates of the 3d points eventually become the x and y coordinates of the 2d points on screen and it’s easier to keep track of

    • dev_null@lemmy.ml
      link
      fedilink
      arrow-up
      4
      ·
      2 months ago

      Except when you are working on top-down game/3D environment. In which case you are constantly changing between Z and Y…

    • Victor@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      2 months ago

      Indeed, depth buffers etc are from the z coordinate.

      Also on the web, the “z-index” is the depth of elements in the world of CSS.

      I wonder in which contexts y would make more sense as the depth.

  • Caveman@lemmy.world
    link
    fedilink
    arrow-up
    17
    ·
    2 months ago

    In a 2D game Y is up. Going from 2D to 3D would make sense to add another dimension forward to account for depth.

    However if you start with a map of a 3D surface then North is Y and East is X you’d add Z to account for elevation like everybody making maps would.

    I guess it depends on how you look at it.

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

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