News for hackers. Stuff that matters.
Re:Why Do Mirrors Flip Things Horizontally but Not Verticall... by GuB-42 on Wednesday October 07, 2020 @10:21AM (#24708505)
The way X,Y,Z axis are portrayed in the way that is most common in computer graphics. X is left-right, Y is up-down, Z is front-back. That's convenient because X,Y are your screen coordinates for 2D work, if required, Z is stored in a separate buffer, aptly called the Z-buffer.

Orientation of the base vectors can vary between tools, engines and APIs but the Z axis is almost always perpendicular to the screen, and having the Z axis perpendicular to the mirror follows this convention.

And a mirror certainly flips things. In a mirror image, parity is reversed, right hands become left hands, screws turn the other way. A person in front of you doesn't see you flipped, he sees you rotated 180 degrees around the up-down axis. You can achieve the same effect with two vertical mirrors at a right angle from each other. Because there are two mirrors, the image is flipped twice, and because of the way parity works, it is the same as not flipping.

One thing we can say is that flat mirrors both flip and rotate. The flip is always the same, there are only 2 parities and the only thing you can do is go from even to odd and odd to even. The rotation depends on the position and orientation of the mirror. If the mirror is vertical, the axis of rotation is vertical and therefore, it will flip left-right. If the mirror is horizontal the axis of rotation will be horizontal and it will flip up-down. Funhouse-style distorted mirrors also flip, like all mirrors, but will apply a complex, non-linear transformation instead of a simple rotation.

There are no comments on this comment yet.