2
$\begingroup$

I synchronized with @David k's first and second answer regarding perspective and parallel projection. From the first question I understand that the image on the screen is typically described in horizontal and vertical coordinates, that is 2D points. But from the second question, I understand that images on the screen are realistic if they use perspective projection which has 3D coordinates.

My confusion is that how we show the image on the screen with 2D points by perspective projection?

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. So when $z_{vp}=0$ projectors (projection vectors) do not converge towards a projection reference point in parallel projection. But in perspective projection, when $z_{vp}=0$, it is reduced to parallel projection, but the projectors converge at the centre of projection. Am I correct above these concepts?

The vanishing point in perspective projection which is 3D coordinates could be represented in the projective plane as $(x, y, z, 0).$ Am I correct?

$\endgroup$
0

2 Answers 2

1
$\begingroup$

Let's try to reign stuff in a bit. In practical applications, we do not deal with infinites. Because that would mean we would need to use some kind of symbolic solver for all of our stuff. We couldn't afford to do this in many practical applications.

Because of these practical considerations, I need to have a near and far plane for my camera rasterizer. If I were to make some kind of vector graphics I most likely wouldn't have infinite objects (or at least deal with this in the scenegraph) and if we would do some sort of tracing we would have a hard time deducing intersections near infinity.

Also because of practical considerations, we do not generally * turn the data into 2D coordinates. What we conceptually do is transform the points so that they seem like something that looks like a perspective projection from a parallel projection in our z-direction. We then use this view to build out the data that we need. During this building process, we are free to discard any data that we don't need. So think of this as a preliminary sorting so that I can really do what I intended easily.

Now usually we have access to both the transformed data and untransformed data so that being terribly concerned about deducing something from the projection, that we can simply read it from the 3D space directly or from our scene graph for that matter, is a priority. But both the z and even the fourth component data could be useful for building my next stage primitives.

Ok so at this point we are done with projecting and now we can start building our output. But this has nothing to do with any of the math you asked so far. The next stages are about triangle barycentric coordinates, shading, intersection finding, depth sorting, etc. The math that you have gone through so far doesn't really help with this step.

* It is hard to generalize somebody might be doing this but I wouldn't because it's a waste of my time.

PS: there's no need to know where vanishing points lie since the projection stage has solved both ends of the line.

$\endgroup$
15
  • $\begingroup$ can you tell what is form of vanishing point in projection plane? It is normal $(x, y, z)$ in projection plane? $\endgroup$
    – user17337
    Commented Oct 28, 2021 at 12:52
  • $\begingroup$ @User4567 im not sure it is a valid question. A vanishing point is caused by two coplanar lines. Any picture can have arbitrarily many vanishing points. Knowing what it is is meaningless for rendering. Projecting is a alternative way of constructing 3d from the way art books teach you to do stuff. $\endgroup$
    – joojaa
    Commented Oct 28, 2021 at 13:45
  • $\begingroup$ but the such image where vanishing point already exist in iamge, like railway track,, so what could be the form of that points? $\endgroup$
    – user17337
    Commented Oct 28, 2021 at 13:56
  • $\begingroup$ @User4567 Does not matter its just a point like everything else. practical implementations work on practical data. The data you usually have tells how to connect consequtive points. Theres no way to know what form it takes it depends on the implementation details of my rendering engine and how i want to encode my data. $\endgroup$
    – joojaa
    Commented Oct 28, 2021 at 14:00
  • $\begingroup$ first of all your answer is very difficult to understand.. And I am struggling to understand vanishing point which is already existing in image and it's form. $\endgroup$
    – user17337
    Commented Oct 28, 2021 at 14:02
1
$\begingroup$

All viewing projections are from 3D to 2D. The parallel projection is just a limit case of perspective.

Writing the equation of a ray from the focal point $(0, 0, -f)$ and intersecting with the viewing plane $z=0$, you have

$$\begin{cases}x'=\dfrac{fx}{f+z}\\y'=\dfrac{fy}{f+z}\end{cases}$$ where the magnification factor $f$ in the numerator compensates the minification with distance.

If you let $f$ tend to infinity, the equations simplify to

$$\begin{cases}x'=x\\y'=y\end{cases}$$

which means that the effect of depth is cancelled and projection is achieved by dropping the $z$ cordinate.


Addendum:

There is a way to replace a perspective projection by a parallel one, using 4D homogeneous coordinates and represent the points as $\left(x,y,z,1+\dfrac zf\right)$, which is equivalent to $\left(\dfrac{fx}{f+z},\dfrac{fy}{f+z},\dfrac{fz}{f+z},1\right)$. By considering the 3D components, you obtain a deformed 3D scene which you can render using a parallel projection, while the depth information is preserved to allow hidden parts removal. Again, when $f$ tends to infinity, the transformation becomes trivial.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.