4 ms·
> "The choice of axes is arbitrary, so we’ll pick something useful for our purposes. We’ll say that Y is up and X and Z are horizontal, and all three axes are p
by MisterTea 6y ago
> "The choice of axes is arbitrary, so we’ll pick something useful for our purposes. We’ll say that Y is up and X and Z are horizontal, and all three axes are perpendicular to each other. Think of the plane XZ as the “floor,” while XY and YZ are vertical “walls” in a square room."
As someone who works with CAD/CNC machines on a daily basis, this is torment. XY is the floor and XZ, YZ are "walls". Same would go for a 3d printer. They're not that arbitrary.
- leloctai 6y agoY up is very common in computer graphic. As for CAD, I know at least Solidworks have the option to use Y up. I think the choice of 3D up axis is related to the expected look direction. 3D printer control software evolved from CNC control software, which is looked at from top down, so up is on the build plate plane. Video game commonly looked at from the side, so up is up. Up is then often associated with Y. And then there the argument about right hand vs left hand coord system...
- ww520 6y agoComputer graphics basically follows what math describes (x,y,z) or what is on the screen or blackboard. On the screen, x-axis is left and right; y-axis is up and down. When z-axis was introduced, it just came in and out of the screen. The convention is negative z values goes into the screen and positive z values out of the screen.
- ggambetta 6y agoI break the negative-Z convention in the book. The math and the diagrams feel a lot more natural to me if Z goes into the screen. I suppose negative-Z comes from measuring Z as "distance from the screen to me", but then you have a bunch of weird negative values in the equations.
- randomswede 6y agoLeft-handed vs right-handed coordinate systems. I prefer right-handed, but for some reason most of computer graphics seem to have adopted left-handed. That was the opposite of fun when I was noodling with writing an OpenGL-based rendering engine for a "fly a spaceship around a 3D maze" game, decade and a half ago. As to why I prefer right-handed? The lin-alg textbook I had at uni uses a right-handed coordinate system for what it calls "the perceivable room" (yes, it is "the book with the cow on", for those in the know).
- ggambetta 6y agoSorry about that :) In CG and gamedev I've seen "Y is up" a lot more, to the extent that the "depth buffer" is usually called the "Z buffer". I don't know how this came to be. You make a very good point that XY as the floor makes a lot of sense, especially if you're coming from the context of "I'm drawing a floorplan on a horizontal table" - the floorplan matches the orientation of the actual floor so XY is the most natural choice. I suppose for a similar reason CG adopted the "XY is a wall" convention, since you start with XY on the screen (a vertical plane in front of you) and only later add depth?
- MisterTea 6y agoI can see how using Z as the depth axis for the 2d coordinate system of the screen is a natural way to go for a programmer. Maybe I can lay my monitor flat on a glass desk and lay on the floor ;-) I've been reading the book and enjoying it so far. Thank you.
- carapace 6y ago> I don't know how this came to be. The numbers on touch-tone phones (as opposed to rotary-dial kids) and the numbers on computer keyboard number pads are reversed: 1 2 3 4 5 6 7 8 9 vs 7 8 9 4 5 6 1 2 3 Why? No one knows...