Must polygon prism have interior angles >144 degree to have sides visible after projection transform?

133 views Asked by At

Most view frustums are 35 to 45 degrees, the angle of each of the four sides as they slope from the near plane to far plane. These are exterior angles. A 36 degree frustum has interior angles of 144 degrees. The projection transform generates a box, rather than a frustum. The sides with 144 degree interior angles swivel in to 90 degrees.

Now consider that a 10-sided prism, a decagon prism, has the same angles as the frustum. If the viewer sees one of its faces orthogonally, as a flat 2D surface, it's neighboring faces will virtually disappear after the projection transform, reduced to 90 degree angles.

Am I correct or wrong?

2

There are 2 answers

0
samgak On

Am I correct or wrong?

Wrong (see below for explanation why).

These are exterior angles.

Field of view is usually defined as an internal angle. However this isn't really important to the general point of the question, so let's just ignore it, it just means that the FoV angle is specified one way instead of another.

Now consider that a 10-sided prism, a decagon prism, has the same angles as the frustum. If the viewer sees one of its faces orthogonally, as a flat 2D surface, it's neighboring faces will virtually disappear after the projection transform, reduced to 90 degree angles.

The hidden assumption here is that what determines the visibility of a face is:

  • the angle of the face
  • the angle that the viewer is facing, and
  • the viewer's field of view.

This seems reasonable on the surface, but it's actually wrong. All of these things influence whether a face is visible to a viewer, but they don't actually determine it on their own. What's missing from the equation is the viewer's position.

What actually determines whether a face is visible to a viewer is whether the viewer's eye position lies on the correct side of the plane that the face lies on, extended in all directions to infinity. Secondarily, the face must also be in the viewer's field of view.

To convince yourself of this, stand in front of a door that opens towards you, and open it about 60 degrees. Then take a couple of steps back. You should be able to see the side of the door that faces the room you are standing in. Now walk forward through the door, facing forward the whole time. At a certain point, the side of the door you could originally see will become invisible, and the other side of the door will become visible. Obviously, the angle of the door hasn't changed, and neither has the direction you are facing, so what has caused the change in visibility is not the angles but the fact that you have passed from one side of the plane that the door lies on to the other.

Here's a diagram to illustrate this in the case of a decagon:

enter image description here

The diagram shows a top down view. The red line represents the plane of one of the faces of the decagon. The blue dots represent different viewer positions and the blue lines represent the field of view angles. When the viewer's eye position is on the "Can't see Face A here" side of the plane, Face A will not be visible, and vice versa for the other side.

For a viewer who "sees one of its faces orthogonally, as a flat 2D surface" (the front face), they will be able to see Face A at position 3 (indicated by the green line), but not at position 2 (because of the narrow FoV), and not at position 1 (because of being on the wrong side of the plane that Face A lies on).

0
Brian Coyle On

Samgak

First, thank you for your response. It's impressive, and completely explanatory.

The view position changes how we see prism angles . I'm interested in what the projection matrix does to the prism. It's often said that projection "crushes" one dimension on the plane.

But that's not really how it works. Instead a projection transform rotates points into a new configuration.

Stand in front a door, so that you can see both the door and neighboring walls clearly. The door is a plane with a surface that's at a 60 degree angle.

A projection matrix squeezes the z-dimension. The view frustum rotates from, say, 40 degrees to 90 degrees. The door rotates from 60 to around 75 degrees. This isn't what the viewer sees, it's only the math.

As you noted, the viewer sets the scene. The viewer's sight lines intersect points in 3D or 2D alike. If the same sight lines intersect the door in 3D reality and when looking at a 2D monitor, then 2D looks like 3D.

Mathematically, however, it's mapped from a different location. A point on the conical frustum door, D1, at x1,y1,z1, is transformed to square, orthogonal frustum position x2,y2,z2. That maps to a screen position x3,y3.

In order to achieve this effect, every point in 3D has to rotate to 90 degrees. In the conical frustum each point, as a vector, has a unique angle to the near plane. Each vector rotates to 90 degrees from where it started, at 80, 60, 45 degrees, etc. The projection matrix performs this rotation.

If the frustum edge is angled at 40 degrees, it rotates 50 more to fit the orthogonal frustum. A surface at 60 degrees, to the left of the center line, will rotate 30 degrees.

Once rotated, the vectors map to the right sight lines as they intersect the screen.

I was confused at first, because it's a roundabout way to generate a 2D scene.