<< Chapter < Page Chapter >> Page >
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.

Often we will want to perform several operations on an object before we display the result. For example, suppose we want to rotate by π 3 and reduce to 1 2 size in each dimension:

G 1 = R ( π 3 ) G G n e w = S ( 1 2 , 1 2 ) G 1 .

If there are n points in the matrix G , it will require 4 n multiplications to perform each of these operations, for a total of 8 n multiplications. However, we can save some multiplications by noting that

G n e w = S ( 1 2 , 1 2 ) [ R ( π 3 ) G ] = A G

where

A = S ( 1 2 , 1 2 ) R ( π 3 ) = 1 2 c o s ( π 3 ) - 1 2 s i n ( π 3 ) 1 2 s i n ( π 3 ) l 2 c o s ( π 3 ) .

In other words, we take advantage of the fact that matrix multiplication is associative to combine S and R into a single operation A , which requires only 8 multiplications. Then we operate on G with A , which requires 4 n multiplications. By “composing” the two operations, we have reduced the total from 8 n to 4 n + 8 multiplications. Furthermore, we can now build operators with complex actions by combining simple actions.

We can build an operator that stretches objects along a diagonal line by composing scaling and rotation. We must

  1. rotate the diagonal line to the x-axis with R ( - θ ) ;
  2. scale with S ( s , 1 ) ; and
  3. rotate back to the original orientation with R ( θ ) .

Figure 1 shows a square being stretched along a 45 o line. The composite operator that performs this directional stretching is

A ( θ , s ) = R ( θ ) S ( s , 1 ) R ( - θ ) = c o s θ - s i n θ s i n θ c o s θ s 0 0 1 c o s θ s i n θ - s i n θ c o s θ = s c o s 2 θ + s i n 2 θ ( s - 1 ) s i n θ c o s θ ( s - 1 ) s i n θ c o s θ c o s 2 θ + s s i n 2 θ .

Note that the rightmost operator in a product of operators is applied first.

Figure one is a series of three two-dimensional graphs displaying the rotations of a square. In the first graph, the square is sitting on the x and y-axis with one vertex at the origin, and a dashed diagonal line labeled 45° indicates a rotation about the line y=x. An arc labeled rotate -π/4 describes the rotation. The second graph shows a square laid diagonally along the x-axis, with one vertex at the origin, and the opposite vertex at a positive spot on the x-axis. The third and fourth vertices lay at a 45 degree angle positively and negatively from the origin. An arrow to the right of the square is labeled, scale. The third is a distorted quadrilateral sitting in the same place as the second square, but slightly stretched horizontally to the right. An arc is labeled, rotate, π/4. The fourth is a shape of the same distortion of that of the third graph, now rotated back to closely resemble the position of the square in the first graph, except that since it is a distorted shape, its vertices are located slightly above and to the right of the original vertices in the shape in the first graph. Figure one is a series of three two-dimensional graphs displaying the rotations of a square. In the first graph, the square is sitting on the x and y-axis with one vertex at the origin, and a dashed diagonal line labeled 45° indicates a rotation about the line y=x. An arc labeled rotate -π/4 describes the rotation. The second graph shows a square laid diagonally along the x-axis, with one vertex at the origin, and the opposite vertex at a positive spot on the x-axis. The third and fourth vertices lay at a 45 degree angle positively and negatively from the origin. An arrow to the right of the square is labeled, scale. The third is a distorted quadrilateral sitting in the same place as the second square, but slightly stretched horizontally to the right. An arc is labeled, rotate, π/4. The fourth is a shape of the same distortion of that of the third graph, now rotated back to closely resemble the position of the square in the first graph, except that since it is a distorted shape, its vertices are located slightly above and to the right of the original vertices in the shape in the first graph.
Rotating and Scaling for Directional Stretching

Questions & Answers

what is mutation
Janga Reply
what is a cell
Sifune Reply
how is urine form
Sifune
what is antagonism?
mahase Reply
classification of plants, gymnosperm features.
Linsy Reply
what is the features of gymnosperm
Linsy
how many types of solid did we have
Samuel Reply
what is an ionic bond
Samuel
What is Atoms
Daprince Reply
what is fallopian tube
Merolyn
what is bladder
Merolyn
what's bulbourethral gland
Eduek Reply
urine is formed in the nephron of the renal medulla in the kidney. It starts from filtration, then selective reabsorption and finally secretion
onuoha Reply
State the evolution relation and relevance between endoplasmic reticulum and cytoskeleton as it relates to cell.
Jeremiah
what is heart
Konadu Reply
how is urine formed in human
Konadu
how is urine formed in human
Rahma
what is the diference between a cavity and a canal
Pelagie Reply
what is the causative agent of malaria
Diamond
malaria is caused by an insect called mosquito.
Naomi
Malaria is cause by female anopheles mosquito
Isaac
Malaria is caused by plasmodium Female anopheles mosquitoe is d carrier
Olalekan
a canal is more needed in a root but a cavity is a bad effect
Commander
what are pathogens
Don Reply
In biology, a pathogen (Greek: πάθος pathos "suffering", "passion" and -γενής -genēs "producer of") in the oldest and broadest sense, is anything that can produce disease. A pathogen may also be referred to as an infectious agent, or simply a germ. The term pathogen came into use in the 1880s.[1][2
Zainab
A virus
Commander
Definition of respiration
Muhsin Reply
respiration is the process in which we breath in oxygen and breath out carbon dioxide
Achor
how are lungs work
Commander
where does digestion begins
Achiri Reply
in the mouth
EZEKIEL
what are the functions of follicle stimulating harmones?
Rashima Reply
stimulates the follicle to release the mature ovum into the oviduct
Davonte
what are the functions of Endocrine and pituitary gland
Chinaza
endocrine secrete hormone and regulate body process
Achor
while pituitary gland is an example of endocrine system and it's found in the Brain
Achor
what's biology?
Egbodo Reply
Biology is the study of living organisms, divided into many specialized field that cover their morphology, physiology,anatomy, behaviour,origin and distribution.
Lisah
biology is the study of life.
Alfreda
Biology is the study of how living organisms live and survive in a specific environment
Sifune
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, A first course in electrical and computer engineering. OpenStax CNX. Sep 14, 2009 Download for free at http://cnx.org/content/col10685/1.2
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'A first course in electrical and computer engineering' conversation and receive update notifications?

Ask