1

We know that in orthographic Projection Projectors (projection vectors) are perpendicular to the projection plane.

And in Perspective Projection Object positions are transformed to the view plane along lines that converge to the projection reference (center) point.

The Point $(x,y,z)$ is projected to position $(x_p,y_p,z_{vp})$ on the view plane.Since the view plane is placed at position $z_{vp}$ along the $z_v$ axis.

Then in parallel projection any point $(x,y,z)$ in viewing coordinates is transformed to projection coordinates as: $x_p=x,$$y_p=y$ and $z_{vp}=0.$

My question is why $(x,y,z)$ is projected to $(x_p,y_p)$, why not $(x_p,y_p,z_{vp}),$ I mean view plane is placed at position $z_{vp}$ ,so why $z_{vp}=0$ in $(x_p,y_p,z_{vp})?$ And another question in perspective projection a why $(x,y,z)$ is projected to $(x_p,y_p,z_{vp})?$

My final question is that in perspective projection projectors are perpendicular to the viewing plane?

N. B. - Reference

S. M.
  • 1
  • The following wiki contains all the information you need. –  Oct 23 '21 at 20:21
  • @Hosam in wiki they just tell, they don't tell the reason, otherwise wiki content is very difficult to understand. – S. M. Oct 23 '21 at 20:28
  • @hosam could you explain in Easy way which is brief – S. M. Oct 23 '21 at 20:30
  • No. I can't. This is a very long topic to handle briefly. –  Oct 23 '21 at 20:37
  • In a nutshell, projections are just intersections of 3D lines with 2D planes. The projected points (or intersection points) belong to the plane and so can be expressed with 2 coordinates in a coordinate system defined in the plane itself (discarding the 3rd coordinate). I am not identifying the 3rd coord with the Z coord on purpose since there is no math reason to identify them. However for plotting an image in a computer screen it is convenient to identify the Z with the 3rd coord and that is the job of the view transform. – Mauricio Cele Lopez Belon Oct 23 '21 at 23:46

2 Answers2

2

You ask questions that relate to some fairly abstract mathematical objects such as the real projective plane. But the topic of the linked presentation that you referred to is a much more concrete problem, which is how to represent a three-dimensional shape on a two-dimensional computer screen. So I will address just that topic.

There are two parts to the topic: how realistic a two-dimensional representation appears to us, and how the computer should obtain that representation.

The "how realistic" question has nothing to do with $x,y,z$ coordinates. Painters were using one-point and even two-point perspective long before the Cartesian coordinate system took hold. Projections are essentially geometric constructions that do not need coordinates. But in a computer, a three-dimensional object is typically described in terms of $x,y,z$ coordinates, and the image on the screen is typically described in horizontal and vertical coordinates.

So in the computer we want some way to get the three $x,y,z$ coordinates of the object "projected" onto the two coordinates of a pixel on the screen.

Now I'm going to explain a lot of stuff that you apparently already know. This may seem redundant, but I need to establish the facts in certain language that I can refer back to later in the answer.


A useful technique to help transform a 3D object onto the computer screen is to suppose there is a "viewing plane" in 3D space onto which we project each point of the object or scene being viewed. We can also assign two perpendicular lines in that plane to be $x$ and $y$ axes, thereby assigning $x,y$ coordinates to every point in the plane. It is then relatively simple to scale and shift the $x$ and $y$ coordinates of each projected point to the horizontal and vertical screen coordinates of the pixel where that point should be displayed. In the presentation, these last steps (from viewing plane coordinates to screen coordinates) are the "Normalization Transformation and Clipping" step and the "Viewport Transformation" step. But the presentation doesn't say much about these steps; it is more concerned with getting the $x,y$ coordinates on the viewing plane.

In order to make the geometric idea of projection work, the viewing plane has to be a plane in the same three-dimensional space as the object. So we call its $x,y$ coordinates $x_v,y_v$ to distinguish them from the other coordinate systems the computer is keeping track of. And once you have set up two axes ($x_v$ and $y_v$) in 3D space, they determine a third axis perpendicular to both of them, which we call the $z_v$ axis.


Now I'll try to address some things that you apparently do not know.

Since we really only care about $x_v$ and $y_v$ coordinates for the final display of the picture on the computer screen, we have some freedom about how we deal with the $z_v$ coordinates. We can put the origin of the $x_v,y_v,z_v$ coordinate system in the viewing plane, as I did a few paragraphs earlier, in which case $z_v=0$ everywhere in the viewing plane, or we can move the origin of that system as far as we want in either direction along the $z_v$ axis, which leaves the $x_v$ and $y_v$ coordinates unchanged at any point in the viewing plane but makes the entire viewing plane have a new (constant) $z_v$ coordinate.

In summary, as long as the $x_v$ and $y_v$ axes are perpendicular to each other and are both parallel to the viewing plane, the $z_v$ axis will be perpendicular to the viewing plane, all points in the viewing plane will have the same $z_v$ coordinate, and the $x_v$ and $y_v$ coordinates of any point in the viewing plane will give you good coordinates to pass to the "Normalization Transformation and Clipping" and "Viewport Transformation" steps that finally display points on the screen.

When I say we have "freedom" with respect to the $z_v$ coordinate, I mean it really does not matter what we choose to be the constant $z_v$ coordinate of the viewing plane, provided that for each projection we do, we make a choice and then stick with that choice for that entire projection. (That means we must consistently use formulas that correctly represent the projection for that choice.) Then, for the next projection, we can make a different choice.

If you look toward the end of the presentation, you will see two slides showing two "special cases" of how we choose the $z_v$ coordinate of the viewing plane for a perspective projection. In one case we set up the axes so that $z_v=0$ everywhere in the viewing plane. Then the reference point where all the projectors (projection lines) converge has to have a non-zero coordinate (because you don't get an image if the reference point is in the viewing plane itself). In the other case we set up the axes so that the reference point where the projectors converge has $z_v$ coordinate zero, so the viewing plane needs to have a non-zero $z_v$ coordinate, which could be $z_v=1$ or something else.

Remember these facts when considering the following answers to your particular questions.

why $(x,y,z)$ is projected to $(x_p,y_p)$, why not $(x_p,y_p,z_{vp})$

Technically it is equally valid to say that $(x,y,z)$ is projected to $(x_p,y_p,z_{vp})$; but since we only care about the display on the screen, we just read off the two coordinates $(x_p,y_p)$ and discard the $z$ coordinate.

view plane is placed at position $z_{vp}$, so why $z_{vp}=0$ in $(x_p,y_p,z_{vp})?$

That's an arbitrary choice that was made by the author of the algorithm. A different value of $z_{vp}$ could also work. The only thing that matters is the geometry of the projection. Just beware that for oblique projections and perspective projections the mathematical formulas that you use will have a dependence on $z_{vp}$, so you need to make sure you use the correct formulas.

And another question in perspective projection why $(x,y,z)$ is projected to $(x_p,y_p,z_{vp})?$

That's a projection to a point expressed in the viewing-plane coordinates. The whole point of a projection like this is to project onto the viewing plane, and you want to use $x$ and $y$ axes that nice Cartesian coordinates in that plane for the "Normalization Transformation and Clipping" and "Viewport Transformation" steps. That means using a coordinate system in which the $z$-coordinate of the plane is constant. But you can (technically) set that constant to whatever you want and still do perspective projection if you're careful about the formulas you use.

My final question is that in perspective projection projectors are perpendicular to the viewing plane?

No, they cannot all be perpendicular to the viewing plane because they all have to converge at a single point. There can be one projector perpendicular to the viewing plane, but every other projector has a different direction in 3D space so it cannot be perpendicular to the same plane.


In summary, in the linked presentation you see some methods for doing orthographic projection, oblique parallel projection, and perspective projection. That is all these are: just some methods of doing these projections, not the only methods of doing these projections. So when you ask why they chose $z_{vp}$ a particular way for a particular projection, the reason is that it was a choice they were allowed to make. They had other choices available but needed to make a choice so that they could show you the formulas that you would use to do the projection according to that choice.

David K
  • 108,155
  • your answer is good. But I need to clarify why $z_{vp}$ is zero in parallel projection but not in perspective projection? – S. M. Oct 24 '21 at 21:47
  • You have a false assumption. In fact, $z_{vp}$ can be non-zero in parallel projection and can be zero in perspective projection. (The presentation you linked to even shows you how to set $z_{vp}=0$ in perspective projection.) – David K Oct 24 '21 at 21:49
  • that's the special case but normally not zero..?? – S. M. Oct 24 '21 at 21:51
  • I think the reason the author of the presentation chose those (two) "special cases" to describe under perspective projection is because those are the (two) ways people normally do perspective projection in a computer program. So in fact he's telling you that $z_{vp}$ normally is zero unless you chose the other case (where $z_{pp}=0$). – David K Oct 24 '21 at 22:02
  • @Davis you wrote oblique projections depends on zvp, .. How? – S. M. Oct 24 '21 at 22:13
  • I said the formulas would depend on $z_{vp}.$ There are $z$ values in the formulas for non-orthogonal oblique projection (look in the presentation). Changing $z_{vp}$ means you moved the origin of the coordinate system, which changes everyone's $z$ coordinates. If you put those new $z$ coordinates into the same formulas you will get different $x_p$ and $y_p$. It is possible to correct the formulas to give the true $x_p$ and $y_p$ coordinates in the viewing plane, but you need to use $z_{vp}$ when developing the formulas. – David K Oct 24 '21 at 22:17
  • please help me...I have adapted with your answer.If you answer this I Will be easily understand.https://math.stackexchange.com/questions/4289886/difference-between-2d-pipeline-and-3d-pipeline – S. M. Oct 28 '21 at 15:06
-1

2D homogenous coordinates (also called projective coordinates) $[u:v:w]$ correspond to points in the real projective plane, except for $[0:0:0]$ which does not correspond to any point. The real projective plane contains the normal Euclidean plane, but extends it by points at infinity.

Points $[u:v:1]$ correspond to points in the Euclidean plane, at 2D Cartesian coordinates $(u, v)$.

Homogenous coordinates have the property that multiplying all coordinates by a nonzero real $k$, $[k u:k v:k w]$, does not affect the point they represent in the real projective plane. That is, both $[u:v:w]$ and $[k u:k v:k w]$ represent the same point, if $0 \ne k \in \mathbb{R}$.

Because multiplying the coordinates by a nonzero scalar does not affect the point the coordinates represent, we can multiply the coordinates of point $[u:v:w]$ by $1/w$ whenever $w \ne 0$, without changing the point we refer to on the projective plane. Because $[u/w:v/w:w/w] = [u:v:1]$ for $w \ne 0$, this means that all finite ($w \ne 0$) homogenous coordinates $[u:v:w]$ refer to point $(u/w, v/w)$ on the 2D Euclidean plane.

Points $[u:v:0]$ to points at infinity on the real projective plane.

3D perspective projection of point $(u, v, w)$ to 2D plane at $(x, y, 1)$ with observer/eye/camera (focal point) at origin is $$\left\lbrace ~ \begin{aligned} x &= \frac{u}{w} \\ y &= \frac{v}{w} \\ z &= \frac{w}{w} = 1 \\ \end{aligned} \right . \tag{1}\label{BtV1}$$ as derived from first principles; optics and geometry. See e.g. here for details.

If our projection plane is at $z = 1$, and observer/eye/camera at origin, then 3D point $(x, y, z)$ with $z \gt 0$ (i.e., in front of the camera) corresponds to point $[x : y : z]$ in the projective plane.

2D homogenous coordinates $[u : v : w]$ can also represent a line in 3D. The real projective line corresponding to plane $u x + v y + w z = 0$ has homogenous coordinates $(u : v : w)$, as described in e.g. the Wikipedia article on the real projective plane. The parametric form of that 3D line is $$\left\lbrace ~ \begin{aligned} x &= u t \\ y &= v t \\ z &= w t \\ \end{aligned} \right., \quad t \in \mathbb{R} \tag{2}\label{BtV2}$$This line also intersects the projection plane at $z = 1$ at homogenous coordinates $[u:v:w]$.

For parallel (orthogonal) projection, however, the line from 3D point $(x, y, z)$ to the correct point on the projection plane, $(x, y)$, is parallel to the $z$ axis, and does not intersect origin (except if $x = y = 0$).

One option, then, is to use the points at infinity in the real projective plane, $[u:v:0]$, for parallel projection.

In practice, when $[u:v:0]$ is used for parallel projection, say in computer programs, using the exact same linear algebra as for perspective projection (using an 3D homogenous coordinates, and a $4 \times 4$ matrix to represent all possible rotations, translations, and scaling in one), it requires that the final operation, where the 2D homogenous coordinates $[u:v:w]$ are converted to 2D coordinates $(u/w, v/w)$ on the projection plane, specially handles the division by zero: for example, as if $x/0 = x$. I suspect that in your materials, it is described as a footnote, something along the lines of "division by zero is obviously omitted, and the two first components used as-is" or "in the case of parallel projection, we omit the division".

Personally, to use perspective projection math to implement parallel projection, I just use a projection matrix that turns $[x:y:z:1]$ (3D points with finite coordinates) into $[x:y:1:1]$. So technically, I use $[u:v:1]$ (and not $[u:v:0]$) for parallel projection. Simply put, I implement parallel projection by using a projection matrix that flattens the 3D world to the $z = 1$ plane. (This works very well in e.g. OpenGL and DirectX.)

When using homogenous coordinates in 3D, I exclusively use $[x:y:z:1]$ for position vectors (at $(x, y, z)$), and $[x:y:z:0]$ for direction vectors, because transforming these with a traditional $4 \times 4$ rotation-translation matrix does translate the position vector, but not the direction vector. (I.e., prior to the 3D to 2D projection, this distinction is useful, since one can use the same $4 \times 4$ transformation matrix, with the fourth component $1$ if the vector specifies a position and thus needs to be translated, and $0$ if the vector specifies a direction and should not be translated. This use has nothing to do with the projective plane, and is basically just a "trick": it uses the fourth component as an indicator whether translation is done or not.)

In parallel projection, there is no benefit from using homogenous coordinates (projective plane) at all, because with the projection plane being perpendicular to the $z$ axis as is usual, 3D point $(u, v, w)$ maps to 2D point $(u, v)$ on the projection plane: no division needed.

  • How can you say $ux+vy+wz=0$ passes through point $(x=u,y=v,z=w)$. Give one example. – S. M. Oct 24 '21 at 18:19
  • @Niyon: I cannot. It's the projective line corresponding to the 3D plane $u x + v y + w z = 0$ that passes through origin and point $(x, y, z)$ and has 2D homogenous coordinates $[u:v:w]$. The parametric form of that line is $x = u t$, $y = v t$, $z = v t$, with $t \in \mathbb{R}$ being the line parameter. I've rewritten the answer; let me know if this gives a better intuitive understanding for you, or not. – Blabbo the Verbose Oct 24 '21 at 20:08
  • @Niyon: If you think the matter can be explained in 4-5 lines, then do so; I can't, so won't. I am not writing this text for you alone; I only write answers where I hope it helps others who arrive at the same question via e.g. a web search. And it's Blabbo, not Blaboo. – Blabbo the Verbose Oct 24 '21 at 21:45