Skip to content Skip to navigation

Connexions

You are here: Home » Content » Vector Graphics: Homogeneous Coordinates

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: Homogeneous Coordinates

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.

In the previous section we were able to combine rotation and scaling into a single composite operation by matrix multiplication. Unfortunately, translation cannot yet be included in the composite operator since we do it by addition rather than by multiplication.

Example 1

Suppose we wish to rotate the image G G by π3π3 about the point (-10,10)(-10,10). Our rotation matrix R(θ)R(θ) always rotates about the origin, so we must combine three transformations to accomplish this:

  1. translate the point (-10,10)(-10,10) to the origin;
  2. rotate π3π3 radians about the origin; and
  3. translate the origin back to (-10,10)(-10,10).

For step (i), we have b0=l0-10b0=l0-10 and

G 1 = G + b 0 1 T . G 1 = G + b 0 1 T .
(1)

For step (ii),

G 2 = R ( π 3 ) G 1 = R ( π 3 ) [ G + b 0 1 T ] = R ( π 3 ) G + R ( π 3 ) b 0 1 T . G 2 = R ( π 3 ) G 1 = R ( π 3 ) [ G + b 0 1 T ] = R ( π 3 ) G + R ( π 3 ) b 0 1 T .
(2)

For step (iii), we can use-b0use-b0 from step (i):

G n e w = G 2 - b 0 1 T = R ( π 3 ) G + R ( π 3 ) b 0 1 T - b 0 1 T = R ( π 3 ) G + [ ( R ( π 3 ) - I ) b 0 ] 1 T . G n e w = G 2 - b 0 1 T = R ( π 3 ) G + R ( π 3 ) b 0 1 T - b 0 1 T = R ( π 3 ) G + [ ( R ( π 3 ) - I ) b 0 ] 1 T .
(3)

In this example we were unable to find a single matrix operator A A to do the entire job. The total transformation took the form

G n e w = A G + b 1 T . G n e w = A G + b 1 T .
(4)

This is called an affine transformation because it involves both multiplication by A A and addition of a constant matrix. This is in contrast to the more desirable linear transformation, which involves only multiplication by A A.

We will now move toward a modified representation of the image and the operators by rewriting the last equation as

Gnew=[Ab]G1TGnew=[Ab]G1T
(5)

where in the example we had A=R(π3)A=R(π3) and b=(R(π3)-I)b0b=(R(π3)-I)b0.

Exercise 1

Show that, for any matrices A,B,C,DA,B,C,D of compatible sizes,

A B + C D = [ A C ] B D . A B + C D = [ A C ] B D .
(6)

The matrix G1TG1T looks like

x 1 x 2 x n y 1 y 2 y n 1 1 1 , x 1 x 2 x n y 1 y 2 y n 1 1 1 ,
(7)

and the points (xi,yi,1)(xi,yi,1) are called homogeneous coordinates. We can modify Equation 5 so that the new point matrix is also in homogeneous coordinates:

G n e w 1 T = A b O T 1 G 1 T . G n e w 1 T = A b O T 1 G 1 T .
(8)

In the new representation, each point in the image has a third coordinate, which is always a 1. The homogeneous transformation is a 3×33×3 matrix,

A h = A b 0 T 1 , A h = A b 0 T 1 ,
(9)

which is capable of translation, rotation, and scaling all by matrix multi- plication. Thus, using homogeneous coordinates, we can build composite transformations that include translation.

In homogeneous coordinates, we have

R ( θ ) = c o s θ - s i n θ 0 s i n θ c o s θ 0 0 0 1 S ( s x , s y ) = s x 0 0 0 s y 0 0 0 1 T ( t x , t y ) = 1 0 t x 0 1 t y 0 0 1 . R ( θ ) = c o s θ - s i n θ 0 s i n θ c o s θ 0 0 0 1 S ( s x , s y ) = s x 0 0 0 s y 0 0 0 1 T ( t x , t y ) = 1 0 t x 0 1 t y 0 0 1 .
(10)

Example 2

The composite transformation to triple the size of an image and then move it 2 units to the left is

A = 1 0 - 2 0 1 0 0 0 l 3 0 0 0 3 0 0 0 1 = 3 0 - 2 0 3 0 0 0 1 . A = 1 0 - 2 0 1 0 0 0 l 3 0 0 0 3 0 0 0 1 = 3 0 - 2 0 3 0 0 0 1 .
(11)

On the other hand, the composite transformation to move an image 2 units to the left and then triple its size is

B = 3 0 0 0 3 0 0 0 1 1 0 - 2 0 1 0 0 0 1 = 3 0 - 6 0 3 0 0 0 1 . B = 3 0 0 0 3 0 0 0 1 1 0 - 2 0 1 0 0 0 1 = 3 0 - 6 0 3 0 0 0 1 .
(12)

In the latter case, the distance of the translation is also tripled.

Exercise 2

Find a single composite transformation in homogeneous coordinates that rotates an image by angle θ θ about point (xi,yi)(xi,yi) as in Example 1.

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