# Should/do parallel lines curve when rendered with perspective?

Simple perspective calculations used in rendering 3D points onto a 2D screen take the form of dividing the camera-relative coordinates by distance from camera and multiplying by a field-of-view parameter, as described here: http://en.wikipedia.org/wiki/Perspective_transform#Perspective_projection

So if I have a set of long horizontal parallel lines, like looking across a huge chess board, shouldn't the lines take on a slight curve on the 2D rendered output, since the lines are closer to the camera in the middle than at the ends?

I don't see this happening in real 3D rendering so I wondered if I have a mistake in my math, or if it's simply the case that the effect is so small it's not noticed?

-
I think you should make the first paragraph in the question more explicit. As it stands I can't make any sense of it, since it seems to be a prescription for scaling three-dimensional coordinates, which leads again to three-dimensional coordinates, whereas the result of calculations for rendering three-dimensional objects in two dimensions would have to be two-dimensional coordinates? – joriki Apr 5 '12 at 11:29
Sorry I'm probably using specialized terminology from the field of 3D computer graphics. See en.wikipedia.org/wiki/… I've edited slightly. – Mr. Boy Apr 5 '12 at 11:40
Your image of a chess board, where the lines are wider apart in the middle: that is not perspective projection. Perhaps it is a "fish-eye" image. en.wikipedia.org/wiki/Fisheye_lens – GEdgar Apr 5 '12 at 12:14

## 1 Answer

Your interpretation of the math is slightly off. In perspective projection, you divide the camera-relative $x$- and $y$-coordinates by the camera-relative $z$-coordinate, not by the full distance $\sqrt{x^2+y^2+z^2}$. This has the nice property that all straight lines in 3D project to straight lines in the image plane. If you are looking directly at a chessboard, for example, everything has the same $z$-coordinate, and so all the lines still appear as straight and parallel.

There are other ways to project a 3D scene onto the 2D image plane, and in some of them, straight lines do curve. But the standard perspective projection is the one most commonly used in 3D graphics, and one reason for that is precisely that it preserves straight lines. So if you want to render a polygon floating somewhere in 3-space, you don't have to draw some weird curvy thing, you just project its vertices and connect them with straight line segments.

-
Perfect, thankyou. – Mr. Boy Apr 5 '12 at 11:55