Chapter 6,

 <  Day Day Up  >  

Chapter 6, "Transformations"

2D Translation by Addition

graphics/ap01equ18.gif

where dx = change in x and dy = change in y .

3D Translation by Addition

graphics/ap01equ19.gif

where dx = change in x, dy = change in y , and dz = change in z .

2D Translation by Multiplication

graphics/ap01equ20.gif

where dx = change in x and dy = change in y .

3D Translation by Multiplication

graphics/ap01equ21.gif

where dx = change in x, dy = change in y , and dz = change in z .

2D Scaling

graphics/ap01equ22.gif

where Sx = scale factor in the x direction and Sy = scale factor in the y direction.

3D Scaling

graphics/ap01equ23.gif

where Sx = scale factor in the x direction, Sy = scale factor in the y direction, and Sz = scale factor in the z direction.

2D Rotation

graphics/ap01equ24.gif

where q is the angle of rotation.

3D Rotation About the z-Axis (Roll)

graphics/ap01equ25.gif

where q is the angle of rotation.

3D Rotation About the x-Axis (Pitch)

graphics/ap01equ26.gif

where q is the angle of rotation.

3D Rotation About the y-Axis (Yaw)

graphics/ap01equ27.gif

where q is the angle of rotation.

2D Combo Matrix

For every 2D combo matrix

graphics/ap01equ28.gif

entries with an r store scaling and rotation information, and entries with a t store overall translation information.

3D Combo Matrix

For every 3D combo matrix

graphics/ap01equ29.gif

entries with an r store scaling and rotation information, and entries with a t store overall translation information.

Conversion Between OpenGL and DirectX Formats

AB = B T A T for matrices A and B:

graphics/ap01equ30.gif

 <  Day Day Up  >  


Beginning Math and Physics for Game Programmers
Beginning Math and Physics for Game Programmers
ISBN: 0735713901
EAN: 2147483647
Year: 2004
Pages: 143
Authors: Wendy Stahler

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net