Topological distortion

euclidean-geometrygeometryprojectionprojective-geometryprojective-space

I understand the view confusion and struggling to understand topological distortion. I read from this website that the points of the plane that is parallel to the view plane and also passes through the COP are projected to infinity by perspective projection.

enter image description here

When we join the point which is back of the viewer to the point which is front of the viewer then the line will projected as a broken line of infinite extent.

My question how the point which is back of the viewer projected to infinite extent by perspective projection? What's the intuition of topological distortion?

I want to understand what does the meaning of this sentence "When we join the point which is back of the viewer to the point which is front of the viewer then the line will projected as a broken line of infinite extent."?

And what does the meaning of broken line of infinite extent?

Best Answer

We will be looking at these slides: Computer Graphics Projections (Viewing Transformations).

My first doubt is what the heck is a COP. Aside from a member of the police force.

So I'll begin one slide before.


View Confusion

On the slide number 12, it says:

View Confusion: If any object exist behind the COP (center of projection), then it can be projected onto the view-plane seems like upside down and backward.

So we are talking of a perspective projection, through a point. That is we have a situation that could be like this:

A right triangle, with one leg as horizontal base. On the left a corner labelled "COP". On the right a vertical leg labelled "Object". The triangle is cut by a vertical line labelled "Projection Plane", and the intersection of the line and the triangle is labelled "Image"

Which is simular to the picture on the slide about foreshortening (slide 10).

And then I add a new object, on the other side of the COP. And when we project it to the projection plane, we end up with an image that is upside down.

A new right triangle added to the left of COP, with a vertical leg labelled New Object. And a line stretching from the top of it, across COP, and reaching the line labelled "Projection Plane" (which is extended downwards). The segment form the intersection to the base is labelled "New Image".


By the way, this situation where we end up with an upside-down image is close to what we would find in a real-life pinhole camera or camera obscura:

Depiction of a camera obscura


Topological distortion

Now that I know what they mean by COP…

On the slide number 13, it says:

Topological distortion: Consider all points on a plane. If these points are parallel to view plane and passes through the COP, then these points are projected to a broken line of infinite degree.

First of all, I'm assuming that it is "Consider all the points on a plane".

However, this makes no sense. There is no concept of points parallel to a plane. I tried assuming they mean "points on a line parallel to the view plane" or "points on a plane parallel to the view plane", but it is not working for me.

So… Let us see the diagram instead.

Diagram from the slides

So we have three points P1, P2, and P3. Which form a line, and the point P3 exists on the plane that is parallel to the view plane and contains COP. Let us try that…

…

So we can project the points P1 and P2, but not P3, which is between them. One would assume that the projection of P3 would be between the projection of P1 and the projection of P2, but it isn't.

Instead, see what happens if we try to project more points of the line approaching P3:

…

2D Animation:

…

3D Animation:

…

As the points being projected approach P3, their projections approach infinity to opposite sides Which is what I presume they mean in the slide by "these points are projected to a broken line of infinite degree".

"broken line of infinite extent" means what it says: a line, that is broken (it has a gap), that extends to infinity.

Observe that the object is a connected set of points (a line in this case), but the image isn't(there is a gap). Also the image also stretches to infinity. As far as I can tell, when we are talking about perspective projections, "topological distortion" means exactly that. However, I believe the term would have a broader meaning in other contexts… But I'm not familiar with it.


Addendum

…

Text from the animation:

The projector line is rotating. The center of rotation is COP. When the projector line intersect both the segment between P1 and P2, and the view plane, its intersection with the view plane is the image of its intersection with the segment between P1 and P2.

The points between P1 and P3 correspond to points from P1' (the image of P1) and downwards to infinity.

The points between P3 and P2 have images going from P2' (the image of P2) and upwards to infinity.

For the point P3 the projector line does not intersect the view plane.

There is no point in the segment between P1 and P2 that has an image between P1' (the image of P1) and P2' (the image of P2).

When the projector line intersects the view plane between P1' (the image of P1) and P2' (the image of P2) it does not intersect the segment between P1 and P2.

Note: since for the point P3 the projector line does not intersect the view plane, P3 does not have an image.


If you pick any point you want between P1 and P2 and draw a line that crosses that point and crosses COP. Then the intersection between that line and the view plane is the image of the point you picked. Except, of course, if you picked P3, the line would not intersect the view plane.

The points between P1' (the image of P1) and P2' (the image of P2) exist on the view plane. But none of the points from the segment between P1 and P2 are projected between P1' (the image of P1) and P2' (the image of P2).

That is, the points between P1 and P2 are not projected inside the segment between P1' (the image of P1) and P2' (the image of P2), instead they are projected outside. They are projected in the view plane, but outside the segment between P1' and P2'.


Demo:

  • Shadertoy: No nearclip.

  • YouTube: No nearclip (It is a recording from Shadertoy).

  • Animation (A not well cut loop of the recording on YouTube, heavily compressed and downsized to fit this site maximum file size to embed here):

    …

On the demo, we are rendering the object both when it is in front and when it is behind the camera. The projected object is always to the left of the camera. And the camera is moving back and forth, and also up and down. That is all the motion. And because of that motion sometimes the object is behind the camera, sometimes the object is in front of the camera, and sometimes it is partially in front and behind the camera. Observe that the image of the object that is behind the camera appears on the right side of the frame, inverted. This shows the topological distortion of perspective projection.

The demo is a ray caster. As such it does not use the classic graphic pipeline. It works by intersecting rays (lines, actually) with planes (then clipping by the projected coordinates on the plane, so the planes don't appear infinite). The intersection of the ray and plane could be behind the camera, and the demo render those anyway.


Which are the distortions?

  • Of course, the image of the point P3 is gone. This is explained above.

  • The points P1 and P2 are the outer points of the segment. That is, the segment exists inside the space between P1 and P2. But the points P1' (the image of P1) and P2' (the image of P2) are the inner points of the image. That is, the image exists outside the space between P1' and P2'. This is shown in the animations above.

    We can also see that image extends outwards from P1' and P2' in this labelled capture from the linked Shadertoy demo:

    …

    Which does not happen when the object does not cross the plane of the observer:

    …

  • The segment that goes from P1 to P2 is continuous (has no gaps). Its image is not continuous, it has a gap (none of the points from the segment between P1 and P2 are projected between P1' and P2'). You can see in the above capture that the image becomes two regions of pixels.

  • We can also observe that the image of the object behind the observer appears inverted (which is what is described in View Confusion).

    On the linked demo we can observe a 180º rotation. We can see this if we compare a capture where the object does not cross the plane of the observer such as shown before. Here is a similar capture using a different texture to make it easier to see the orientation:

    …

    And here I have copied the red face over, rotated it 180º, and put it next to the image of the part of the object that is behind the observer, and we see the orientation after the 180º rotation matches:

    …

    Note: In this picture P2' is out of the frame.

    The texture used here is a photo of Piccadilly Circus, which is available on Shadertoy.

  • The points very close to P3 on the segment have images on the view plane that are very far away from each other. But points very close to P1 on the segment have images on the view plane that are close together. Similarly the points that are close to P2 on the segment have images that are close together on the view plane.

    This is what happens if I project two points that are nearby P1:

    …

    As you can see, I picked two points P1a and P1b that are nearby P1, and we see their images P1a' and P1b' are also near each other.

    If I pick two points P3a and P3b nearby P3, on the same side, and about the same distance apart from each other as P1a and P1b… First of all, I need to zoom out a lot to the point we cannot tell P3a and P3b apart. But more importantly their images are not so close to each other:

    …

    We can also see this distortion here:

    … …

    In these images I highlighted a segment and its image in blue, and another segment and its image in green. Notice that the blue segment is longer than the green segment (it is twice as long), but the image of the blue segment is shorter than the image of the green segment. This is because the green segment is closer to P3.

  • The segment has finite length, but its image has infinite lengths. As you can imagine, the closer we pick a point to P3 on the segment, the further away its image is on the view plane, and there is no bound to how far the image can get.