Skip to content Skip to navigation

OpenStax-CNX

You are here: Home » Content » Vector Graphics: Projections

Navigation

Lenses

What is a lens?

Definition of a lens

Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual member, a community, or a respected organization.

What are tags? tag icon

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

This content is ...

Endorsed by Endorsed (What does "Endorsed by" mean?)

This content has been endorsed by the organizations listed. Click each link for a list of all content endorsed by the organization.
  • IEEE-SPS

    This module is included inLens: IEEE Signal Processing Society Lens
    By: IEEE Signal Processing SocietyAs a part of collection: "A First Course in Electrical and Computer Engineering"

    Click the "IEEE-SPS" link to see all content they endorse.

  • College Open Textbooks display tagshide tags

    This module is included inLens: Community College Open Textbook Collaborative
    By: CC Open Textbook CollaborativeAs a part of collection: "A First Course in Electrical and Computer Engineering"

    Comments:

    "Reviewer's Comments: 'I recommend this book as a "required primary textbook." This text attempts to lower the barriers for students that take courses such as Principles of Electrical Engineering, […]"

    Click the "College Open Textbooks" link to see all content they endorse.

    Click the tag icon tag icon to display tags associated with this content.

Affiliated with (What does "Affiliated with" mean?)

This content is either by members of the organizations listed or about topics related to the organizations listed. Click each link to see a list of all content affiliated with the organization.
  • Bookshare

    This module is included inLens: Bookshare's Lens
    By: Bookshare - A Benetech InitiativeAs a part of collection: "A First Course in Electrical and Computer Engineering"

    Comments:

    "Accessible versions of this collection are available at Bookshare. DAISY and BRF provided."

    Click the "Bookshare" link to see all content affiliated with them.

  • NSF Partnership display tagshide tags

    This module is included inLens: NSF Partnership in Signal Processing
    By: Sidney BurrusAs a part of collection: "A First Course in Electrical and Computer Engineering"

    Click the "NSF Partnership" link to see all content affiliated with them.

    Click the tag icon tag icon to display tags associated with this content.

  • Featured Content display tagshide tags

    This module is included inLens: Connexions Featured Content
    By: ConnexionsAs a part of collection: "A First Course in Electrical and Computer Engineering"

    Comments:

    "A First Course in Electrical and Computer Engineering provides readers with a comprehensive, introductory look at the world of electrical engineering. It was originally written by Louis Scharf […]"

    Click the "Featured Content" link to see all content affiliated with them.

    Click the tag icon tag icon to display tags associated with this content.

Also in these lenses

  • UniqU content

    This module is included inLens: UniqU's lens
    By: UniqU, LLCAs a part of collection: "A First Course in Electrical and Computer Engineering"

    Click the "UniqU content" link to see all content selected in this lens.

  • Lens for Engineering

    This module is included inLens: Lens for Engineering
    By: Sidney Burrus

    Click the "Lens for Engineering" link to see all content selected in this lens.

Recently Viewed

This feature requires Javascript to be enabled.

Tags

(What is a tag?)

These tags come from the endorsement, affiliation, and other lenses that include this content.
 

Vector Graphics: Projections

Module by: Louis Scharf. E-mail the author

Note:

This module is part of the collection, A First Course in Electrical and Computer Engineering. The LaTeX source files for this collection were created using an optical character recognition technology, and because of this process there may be more errors than usual. Please contact us if you discover any errors.

Computer screens and printers are two-dimensional display devices. We must somehow convert three-dimensional images to two dimensions in order to display them. This task is done by another kind of matrix operator called a projection.

To build a projection, we first choose a projection plane in the three- dimensional space of the object we wish to view. All points of the object are then projected onto the plane. There are many different kinds of projections, corresponding to various geometric rules for mapping points in space onto a plane. We begin with the parallel projection illustrated in Figure 1, wherein the dotted lines between the points and their projections in the plane are all parallel to one another. These dotted lines are called projectors.

Range. The projection plane is called the range of the projection. We will assume for now that the projection plane passes through the origin. If it does not, we may later compose the necessary translations with our projection. Three points, not all in a line, are required to determine a plane. We will take the origin as one of the points and suppose that the other two points are the vectors r 1 r 1 and r 2 r 2 . From these vectors, we form the matrix

R=[r1r2],R=[r1r2],
(1)

which determines the range of the projection.

Figure 1: Oblique Parallel Projection
Figure one shows a rectangular prism hanging in three-dimensional space, and dashed lines showing the projection of the vertices of the object down to the x-y plane.

Null-Space. To complete the specification of the parallel projection, we must specify the direction of the projectors. The line through the origin in this direction is called the null-space of the projection. Note that any line in the three-dimensional object that is parallel to the null-space will disappear to a point when projected. The null-space may be specified by a vector n n pointing in the direction of the projectors.

Orthogonal Projection. If the null-space is perpendicular to the range, we say that the projection is an orthogonal projection. The matrix operator for orthogonal projection is a function of the range. If we assume that R R is specified in three-dimensional coordinates (not homogeneous!), we have the following definition for the orthogonal projection onto the range of R R:

P(R)=R(RTR)-1RTR3×3.P(R)=R(RTR)-1RTR3×3.
(2)

In homogeneous coordinates, we embed this 3×33×3 projection matrix in the general 4×44×4 transformation:

Ph(R)=P(R)00T1.Ph(R)=P(R)00T1.
(3)

Example 1

Suppose we choose the x-yx-y plane as our projection plane. Vectors r 1 r 1 and r 2 r 2 can be any two points in the plane (besides the origin), so let's take

r 1 = 1 0 0 , r 2 = 1 1 0 r 1 = 1 0 0 , r 2 = 1 1 0
(4)

Then the range matrix is

R = 1 1 0 1 0 0 . R = 1 1 0 1 0 0 .
(5)

The orthogonal projection looking down on the x-yx-y plane from the z-axis is

P ( R ) = 1 1 0 1 0 0 ( 1 0 0 1 1 0 1 1 0 1 0 0 ) - 1 1 0 0 1 1 0 = 1 0 0 0 1 0 0 0 0 . P ( R ) = 1 1 0 1 0 0 ( 1 0 0 1 1 0 1 1 0 1 0 0 ) - 1 1 0 0 1 1 0 = 1 0 0 0 1 0 0 0 0 .
(6)

In homogeneous coordinates,

P h ( R ) = 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 · P h ( R ) = 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 ·
(7)

Exercise 1

Let the vectors r1=200r1=200 and r2=030r2=030 specify the range of an orthogonal projection. Find P(R)P(R) and Ph(R)Ph(R). Compare with Example 1 and explain any similarities.

Example 2

In the chapter on linear algebra you learned that the projection of w w onto x x is given by

z = ( x , w ) x ( x , x ) z = ( x , w ) x ( x , x )
(8)

This is an orthogonal projection of w onto a line, but it is closely related to the projection into the plane just described. To see the similarity, let's work on the expression for zz a little:

z = x ( x , w ) ( x , x ) = x ( x , x ) - 1 ( x , w ) = x ( x T x ) - 1 ( x T w ) = [ x ( x T x ) - 1 x T ] w = P ( x ) w . z = x ( x , w ) ( x , x ) = x ( x , x ) - 1 ( x , w ) = x ( x T x ) - 1 ( x T w ) = [ x ( x T x ) - 1 x T ] w = P ( x ) w .
(9)

So we see that it can be written in the same way as the projection onto the plane. The only difference is that the range is now one-dimensional and specified by x x in place of R R.

Oblique Projection. More generally, we may have a null-space n n that is not perpendicular to the range R. The projection shown in Figure 1 is an oblique projection. Once again we start with nonhomogeneous coordinates for nn and R R and write the 3×33×3 oblique projection as

E ( R , n ) = R { R T [ I - - P ( n ) ] R } - 1 R T [ I - - P ( n ) ] E ( R , n ) = R { R T [ I - - P ( n ) ] R } - 1 R T [ I - - P ( n ) ]
(10)

where

P ( n ) = n ( n T n ) - l n T = n n T | | n | | 2 P ( n ) = n ( n T n ) - l n T = n n T | | n | | 2
(11)

As with the orthogonal projection, we can return to homogeneous coordinates by

Eh(R,n)=E(Rn)0OT1.Eh(R,n)=E(Rn)0OT1.
(12)

Exercise 2

Prove and interpret the following properties of paralle1 projections (both orthogonal and oblique):

  1. P2=P;E2=EP2=P;E2=E.
  2. PR=R;ER=RPR=R;ER=R.
  3. En=0;Pn=0En=0;Pn=0. (First show that RTn=0RTn=0 when n is orthogonal to R.R.)

Display from Projections. Even after we have used a projection, the image points are in three-dimensional homogeneous coordinates. How then do we display them on a two-dimensional display? If we had chosen the x - yx-y plane as the range of our projection, we could let the output device represent the x - yx-y plane and ignore the z-coordinate of each point. The z-coordinates of the projected image would all be 0 anyway since the projected points would lie in the x - yx-y plane. The fourth coordinate of 1 may also be ignored for display. But even if the projection plane is not the x - yx-y plane, we may perform a rotation to align the two planes and again let the output device represent the x - yx-y plane.

Perspective Projections. To obtain a perspective projection, we first choose a projection plane as we did for parallel projections. Instead of choosing a null-space parallel to all projectors, we now choose a viewpoint. The projectors all pass through the viewpoint in a perspective projection, as shown in Figure 2. For a viewpoint at z=dz=d on the z-axis and a projection plane coinciding with the x-yx-y plane, the three-dimensional homogeneous operator for perspective projection is

M(d)=10000100000000-1d1.M(d)=10000100000000-1d1.
(13)

The first thing you should notice about the perspective projection M(d)M(d) is that it violates the structure given in Equation 2 from "Vector Graphics: Three-Dimensional Homogeneous Coordinates" by having the 4,3 position equal to -1d-1d rather than to 0. This means that the fourth coordinates will not remain 1 in the new point matrix

G n e w = M ( d ) G . G n e w = M ( d ) G .
(14)
Figure 2: A Perspective Projection
Figure one shows a rectangular prism hanging in three-dimensional space, and a projection point above on the z-axis with dashed lines going through the vertices on the prism and continuing downward to land and make a shape on the x-y plane. Above the graph is an equation that reads, G_new = M(d) G.

This situation is interpreted to mean that the new point ( x , y , z , w ) ( x , y , z , w ) must be renormalized to ( x w , y w z w 1 ) ( x w , y w z w 1 ) before the operation is considered complete. Renormalization adds another computational step to the image transformation process. This is undesirable, but we are stuck with it if we wish to include perspective projections in our repertoire of transformations. Note that renormalization is a point-by-point process since ww may be different for each point.

How does renormalization affect composition of operators? We might expect that, each time we perform an operation requiring renormalization, we will be forced to stop and do the renormalization before going on with other operations. In this respect we are fortunate: we may put off the renormalization until all transformations are complete and renormalize once just before displaying the image. Thus we are able to compose perspective projections at will with other transformations.

Exercise 3

What is the perspective projection matrix for a viewpoint at infinity, M()M()? Interpret the result.

Generalization of Projections. “Projection” is a technical term in linear algebra. A square matrix of any size is considered a projection if it obeys the property of Exercise 2(a), P2=PP2=P. All of our geometric projection matrices have this property. We have considered only three-dimensional spaces with a two-dimensional range and a one-dimensional null-space. In general, the dimensionality of the space may be split in any way between range and null-space. If we reinterpret homogeneous coordinates as four-dimensional space, we have projections with three-dimensional range and one-dimensional null-space, but the perspective projection is actually not quite a projection in the technical sense even though M2(d)=M(d)M2(d)=M(d) because perspective projection also includes renormalization.

Content actions

Download module as:

Add module to:

My Favorites (?)

'My Favorites' is a special kind of lens which you can use to bookmark modules and collections. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need an account to use 'My Favorites'.

| A lens I own (?)

Definition of a lens

Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual member, a community, or a respected organization.

What are tags? tag icon

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

| External bookmarks