I'm learning OpenGL from arcsynthesis and I don't understand something about perspective projection (http://www.arcsynthesis.org/gltut/Positioning/Tut04%20Perspective%20Projection.html).
When the author gives the example "2D to 1D Perspective Projection Diagram", is R a 2D point or a scalar? When I saw the figure I thought it was a scalar because of the title and I thought that P is projected in a line (the Projection Plan). But later, when I saw the perspective computation, I realized that R has the same number of coordinates of P, because, from that equation, R is a product of the vector P with a scalar, so basically, I don't understand how many coordinates has R.
I don't know where that equation (the perspective computation) comes from, if someone could just give me some information about it I would appreciate it.