• Home
  • Textbooks
  • Computer Graphics with Open GL
  • Two-Dimensional Geometric Transformations

Computer Graphics with Open GL

Donald Hearn. M. Pauline. Baker, Warren R.Carithers

Chapter 6

Two-Dimensional Geometric Transformations - all with Video Answers

Educators


Chapter Questions

00:32

Problem 1

Write an animation program that implements the example two-dimensional rotation procedure of Section 1. An input polygon is to be rotated repeatedly in small steps around a pivot point in the $x y$ plane. Small angles are to be used for each successivestep in the rotation, and approximations to the sine and cosine functions are to be used to speed up the calculations. To avoid excessive accumulation of round-off errors, reset the original coordinate values for the object at the start of each new revolution.

Hossam Mohamed
Hossam Mohamed
Numerade Educator
01:27

Problem 2

Show that the composition of two rotations is additive by concatenating the matrix representations for $\mathbf{R}\left(\theta_{1}\right)$ and $\mathbf{R}\left(\theta_{2}\right)$ to obtain
$$
\mathbb{R}\left(\theta_{1}\right)-\mathbb{R}\left(\theta_{2}\right)=\mathbb{R}\left(\theta_{1}+\theta_{2}\right)
$$

James Kiss
James Kiss
Numerade Educator
01:14

Problem 3

Modify the two-dimensional transformation matrix (39), for scaling in an arbitrary direction, to include coordinates for any specified scaling fixed point $\left(x, y_{f}\right)$.

Adriano Chikande
Adriano Chikande
Numerade Educator
01:23

Problem 4

Prove that the multiplication of transformation matrices for each of the following sequences is commutative:
(a) Two successive rotations.
(b) Two successive translations.
(c) Two successive scalings.

AG
Ankit Gupta
Numerade Educator
00:30

Problem 5

Prove that a uniform scaling and a rotation form a commutative pair of operations but that, in general, scaling and rotation are not commutative operations.

James Kiss
James Kiss
Numerade Educator
00:46

Problem 6

Multuple the individual scale, rotate, and translate matrices in Equation 42 to verify the elements in the composite transformation matrix.

Ernest Castorena
Ernest Castorena
Numerade Educator
01:46

Problem 7

Modify the example program in Section 4 so that transformation parameters can be specified as user input.

Dwijendra Rao
Dwijendra Rao
Numerade Educator
02:13

Problem 8

Modify the program from the previous exercise so that the transformation sequence can be applied to any polygon, with vertices specified as user input.

Erika Bustos
Erika Bustos
Numerade Educator
01:05

Problem 9

Modify the example program in Section 4 so that the order of the geometric transformation sequence can be specified as user input.

Lucas Finney
Lucas Finney
Numerade Educator
04:28

Problem 10

Show that transformation matrix (55), for a reflection about the line $y=x$, is equivalent to a reflection relative to the $x$ axis followed by a counterclockwise rotation of $90^{\circ}$.

Wendy Wang
Wendy Wang
Numerade Educator
04:28

Problem 11

Show that transformation matrix (56), for a reflection about the line $y=-x_{,}$is equivalent to a reflection relative to the $y$ axis followed by a counterclockwise rotation of $90^{\circ}$.

Wendy Wang
Wendy Wang
Numerade Educator
03:18

Problem 12

Show that two successive reflections about either the $x$ axis or the $y$ axis is equivalent to a single rotation in the $x y$ plane about the coordinate origin.

Noraney Ocampo
Noraney Ocampo
Numerade Educator
03:41

Problem 13

Determine the form of the two-dimensional transformation matrix for a reflection about any line: $y=m x+b$.

Anthony Ramos
Anthony Ramos
Numerade Educator
02:20

Problem 14

Show that two successive reflections about any line in the $x y$ plane that intersects the coordinate origin is equivalent to a rotation in the $x y$ plane about the origin.

Stanley Enemuo
Stanley Enemuo
Numerade Educator
02:14

Problem 15

Determine a sequence of basic transformations that is equivalent to the $x$-direction shearing matrix (57).

Tanishq Gupta
Tanishq Gupta
Numerade Educator
02:39

Problem 16

Determine a sequence of basic transformations that is equivalent to the $y$-direction shearing matrix $(61)$.

Tanishq Gupta
Tanishq Gupta
Numerade Educator
05:05

Problem 17

Set up a shearing procedure to display twodimensional italic characters, given a vector font definition. That is, all character shapes in this font are defined with straight-line segments, and italic characters are formed with shearing transformations. Determine an appropriate value for the shear parameter by comparing italics and plain text in some available font. Define a sample vector font for input to your routine.

Chai Santi
Chai Santi
Numerade Educator
01:37

Problem 18

Derive the following equations for transforming a coordinate point $\mathrm{P}=(x, y)$ in one twodimensional Cartesian system to the coordinate values $\left(x^{\prime}, y^{\prime}\right)$ in another Cartesian system that is rotated counterclockwise by an angle $\theta$ relative to the first system. The transformation equations can be obtained by projecting point P onto each of the four axes and analyzing the resulting right triangles.
$$
x^{\prime}=x \cos \theta+y \sin \theta \quad y=-x \sin \theta+y \cos \theta
$$

Linh Vu
Linh Vu
Numerade Educator
View

Problem 19

Write a procedure to compute the elements of the matrix for transforming object descriptions from one two-dimensional Cartesian coordinate system to another. The second coordinate system is to be defined with an origin point $\mathbf{P}_{0}$ and a vector $\mathbf{V}$ that gives the direction for the postive $y /$ axis of this system.

Victor Salazar
Victor Salazar
Numerade Educator
08:08

Problem 20

Set up procedures for implementing a block transfer of a rectangular area of a frame buffer, using one function to read the area into an array and another function to copy the array into the designated transfer area.

Debasish Das
Debasish Das
Numerade Educator
03:09

Problem 21

Determine the results of performing two successive block transfers into the same area of a frame buffer using the various Boolean operations.

Jennifer Stoner
Jennifer Stoner
Numerade Educator
03:09

Problem 22

What are the results of performing two successive block transfers into the same area of a frame buffer using the binary arithmetic operations?

Jennifer Stoner
Jennifer Stoner
Numerade Educator
00:19

Problem 23

Implement a routine to perform block transfers in a frame buffer using any specified Boolean operation or a replacement (copy) operation.

AG
Ankit Gupta
Numerade Educator
01:00

Problem 24

Write a routine to implement rotations in increments of $90^{\circ}$ in frame-buffer block transfers.

Ashley High
Ashley High
Numerade Educator
00:31

Problem 25

Write a routine to implement rotations by any specified angle in a frame-buffer block transfer.

Gianna Calciano
Gianna Calciano
Numerade Educator
01:14

Problem 26

Write a routine to implement scaling as a raster transformation of a pixel block.

Adriano Chikande
Adriano Chikande
Numerade Educator
22:52

Problem 27

Write a program to display an animation of a black square on a white background tracing a circular, clockwise path around the display window with the path's center at the display window's center (like the tip of the minute hand on a clock). The orientation of the square should not change. Use only basic OpenGL geometric transformations to do this.

Brian Ketelobeter
Brian Ketelobeter
Numerade Educator
02:19

Problem 28

Repeat the previous exercise using OpenGL matrix operations.

Adriano Chikande
Adriano Chikande
Numerade Educator
07:35

Problem 29

Modify the program in Exercise 27 to have the square rotate clockwise about its own center as it moves along its path. The square should complete one revolution about its center for each quarter of its path around the window that it completes. Use only basic OpenGL geometric transformations to do this.

Christine Anacker
Christine Anacker
Numerade Educator
02:19

Problem 30

Repeat the previous exercise using OpenGL matrix operations.

Adriano Chikande
Adriano Chikande
Numerade Educator
02:51

Problem 31

Modify the program in Exercise 29 to have the square additionally "pulse" as it moves along its path. That is, for every revolution about its own center that it makes, it should go through one pulse cycle that begins with the square at full size, reduces smoothly in size down to 50 normal size by the end of the cycle. Do this using only basic OpenGL geometric transformations.

Aaron Goree
Aaron Goree
Numerade Educator
11:45

Problem 32

Repeat the previous exercise using only OpenGL matrix operations.

Sirat Shah
Sirat Shah
Numerade Educator