Viewing in 3D

1. Projections Types:

  • perspective
  • parallel / orthographic

2. Viewing Parameters:

  • position of the viewer’s eye
  • location of the viewing plane
  • 2-coordinate systems
  • the scene (object)
  • viewing eye coordinate system

3. Clipping:

  • against 3D-view volume

4. Projection and displaying on viewport

Consider Projection Transformation :

Projection:

It is a process that transform points in a coordinate system of dimension n into points in a coordinate system of dimension less than n.

Projection from 3D to 2D tools:

  • projectors: straight projection rays
  • center of projection (COP)
  • projection plane ==> (not curved surface).

This type is called Planar Geometric Projection.

Types of Projections:

1. Perspective Projection

  • projectors meet at center of projection (eye, camera)
  • approximation of human visual system
  • distortion close to COP

2. Parallel Projection

  • Projectors are parallel
  • COP is at infinity

1. Perspective Projection:

  • The size of perspective projection of an object varies inversely with the distance of that object from the center of projection
  • not realistic
  • distances cannot be taken from the projection
  • angles are preserved on only those faces of the objects parallel to the projection plane
  • Vanishing point:
  • The perspective projection of any set of parallel lines that are not parallel to projection plane converges to a vanishing point. ==> (parallel lines meet at infinity ==> )
  • Axis vanishing point:
  • When the set of lines is parallel to one of the 3 axes(, x, y and z).

What is the maximum number of vanishing points?

One-point perspective projection of cube onto plane cutting the z-axis. The projection plane normal is parallel to the z-axis.


2. Parallel Projections:

Depending on the relation between the direction of projection and the normal to the projection plane:

a - orthographic :

both directions are the same (or the reverse of each other)

b - oblique:

direction of projection is not normal to the projection plane.

Examples:

(1) Orthographic Projection

(2) Oblique Projection

(projectors are not normal to projection plane)

(3) Isometric Projection:

It is the kind of projection generated when the projection plane normal makes equal angles with each principle axis.

(4) Axonometric Orthographic Projection:

The type of projection that uses planes that are not normal to a principal axis and therefore show several faces of the object at once.

Remarks on Parallel Projection:

  • less realistic view
  • can be used for exact measurements
  • parallel lines remain parallel
  • angles are preserved only on faces of the object parallel to the projection plane.

Projection of 3D scene onto 2D screen has two major components:

1 specification of a camera

2 specification of a viewing transformation

The viewing transformation:

specification of the parameters:

- A field-of-view angle, 

- Near and far bounding planes perpendicular to z.

- A 3D view of the camera and its viewing space as in the figure below:

Camera Viewing Space

Consider a side view of such a space:

Viewing Pyramid

note: u-axis coming out of the paper:

note:  forms a viewing volume in the shape of a pyramid with the camera at the apex of the pyramid and the negative-w axis of the pyramid

The Viewing Transformation Matrix

Given the specs of parameters , we define the transformation of 3D scene elements to the cube is:

viewing transformation matrix

Development of the matrix:

- consider camera at origin

- use similar triangles:

The transformation that projects

This can be expressed in H-D homogeneous coordinate:

In a Matrix form:

Consider:

Need to transfer the viewing pyramid defined by , n and f into the cube .

To transform the truncated viewing pyramid to the cube, P-matrix can be used:

(*)

where a and b are chosen constants which will cause the w values of the transformed truncated viewing pyramid to lie in the range .

So we get:

and

We have:

and

Projecting back to the 3D we get:

and

In order that the values on the left map to (0,0,1) and (0,0,-1) respectively we must have:

-dan+b = n

and

-daf+b = -f

subtract these equations and solve for (a)

by substitution:

Inserting these values in our transformation matrix P indicated by * above