1 Dr. Scott Schaefer 3D Transformations. 2/149 Review – Vector Operations Dot Product.

Slides:



Advertisements
Similar presentations
3D Transformations Assist. Prof. Dr. Ahmet Sayar
Advertisements

Computer Graphics: 3D Transformations
CLASS 4 CS770/870. Translation Scale Multiplying Matrices. The R C rule What happens when we do two translates? What happens when we do two scales?
1 Computer Graphics Chapter 8 3D Transformations.
1 Computer Graphics Chapter 6 2D Transformations.
Math 1Hofstra University – CSC171A1 Modeling Objects by Polygonal Approximations Define volumetric objects in terms of surfaces patches that surround the.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2005 Tamara Munzner Transformations II Week.
1 Geometrical Transformation 2 Outline General Transform 3D Objects Quaternion & 3D Track Ball.
Image Warping : Computational Photography Alexei Efros, CMU, Fall 2006 Some slides from Steve Seitz
1 Lecture 7 Geometrical Transformations: 2D transformations 3D transformations Matrix representation OpenGL functions.
2/7/2001Hofstra University – CSC290B1 Review: Math (Ch 4)
Modeling Objects by Polygonal Approximations
OpenGL (II). How to Draw a 3-D object on Screen?
CS 4731: Computer Graphics Lecture 11: 3D Viewing Emmanuel Agu.
2D Transformations. World Coordinates Translate Rotate Scale Viewport Transforms Hierarchical Model Transforms Putting it all together.
3D Transformation. In 3D, we have x, y, and z. We will continue use column vectors:. Homogenous systems:. 3D Transformation glVertex3f(x, y,z);
Introduction to 3D viewing 3D is just like taking a photograph!
Transformations Aaron Bloomfield CS 445: Introduction to Graphics
The Viewing Pipeline (Chapter 4) 5/26/ Overview OpenGL viewing pipeline: OpenGL viewing pipeline: – Modelview matrix – Projection matrix Parallel.
Graphics Graphics Korea University kucg.korea.ac.kr Transformations 고려대학교 컴퓨터 그래픽스 연구실.
2D Transformations.
Geometric Transformations Jehee Lee Seoul National University.
2003CS Hons RW778 Graphics1 Chapter 5: Transforming Objects 5.2 Introduction to Transformations 5.2 Introduction to Transformations –Affine transformations.
Geometric transformations The Pipeline
CSE 681 Review: Transformations. CSE 681 Transformations Modeling transformations build complex models by positioning (transforming) simple components.
1 Homogeneous Transformation Ref: Richard Paul Chap. 1.
CAP4730: Computational Structures in Computer Graphics 3D Transformations.
Viewing CS418 Computer Graphics John C. Hart. Graphics Pipeline Homogeneous Divide Model Coords Model Xform World Coords Viewing Xform Still Clip Coords.
University of North Carolina at Greensboro
1/50 CS148: Introduction to Computer Graphics and Imaging Transforms CS148: Introduction to Computer Graphics and Imaging Transforms.
2 COEN Computer Graphics I Evening’s Goals n Discuss viewing and modeling transformations n Describe matrix stacks and their uses n Show basic geometric.
3D Transformations. Translation x’ = x + tx y’ = y + ty z’ = z + tz P = P’ = T = P’ = T. P tx ty tz xyz1xyz1 x’ y’ z’ 1 x y.
Geometric Transformations
Affine Transformation. Affine Transformations In this lecture, we will continue with the discussion of the remaining affine transformations and composite.
Chapters 5 2 March Classical & Computer Viewing Same elements –objects –viewer –projectors –projection plane.
Transformations CS 445/645 Introduction to Computer Graphics David Luebke, Spring 2003.
Geometric Transformations Sang Il Park Sejong University Many slides come from Jehee Lee’s.
3-D Transformational Geometry CS418 Computer Graphics John C. Hart.
Introduction to Computer Graphics: Viewing Transformations Rama C
Taxonomy of Projections FVFHP Figure Taxonomy of Projections.
Transformations: Projection CS 445/645 Introduction to Computer Graphics David Luebke, Spring 2003.
Honours Graphics 2008 Session 2. Today’s focus Vectors, matrices and associated math Transformations and concatenation 3D space.
CS 4731: Computer Graphics Lecture 12: More 3D Viewing Emmanuel Agu.
Learning Objectives Affine transformations Affine transformations Translation Translation Rotation Rotation Scaling Scaling Reflection Reflection Shear.
1 Geometric Transformations-II Modelling Transforms By Dr.Ureerat Suksawatchon.
Geometric Transformations. Transformations Linear transformations Rigid transformations Affine transformations Projective transformations T Global reference.
Jinxiang Chai CSCE441: Computer Graphics 3D Transformations 0.
Viewing and Projection. The topics Interior parameters Projection type Field of view Clipping Frustum… Exterior parameters Camera position Camera orientation.
Geometric Transformations Ceng 477 Introduction to Computer Graphics Computer Engineering METU.
OpenGL LAB III.
CS380 LAB II OpenGL Donghyuk Kim Reference1. [OpenGL course slides by Rasmus Stenholt] Reference2. [
CSCE 441 Computer Graphics: 2D Transformations
Modeling Transformations
University of North Carolina at Greensboro
Camera Position (5.6) we specify the position and orientation of the camera to determine what will be seen. use gluLookAt (eye x, y, z, at x, y, z, up.
2D Geometric Transformations
Review: Transformations
Reference1. [OpenGL course slides by Rasmus Stenholt]
CSC461: Lecture 19 Computer Viewing
Transformations 6 University of British Columbia
Viewing and Perspective Transformations
Transformations IV Week 3, Wed Jan 20
Transformations 고려대학교 컴퓨터 그래픽스 연구실 kucg.korea.ac.kr.
The Modelview Matrix Lecture 8 Mon, Sep 10, 2007.
Transformations in OpenGL
Chapter 3 Viewing.
Transformations IV Week 3, Wed Jan 23
CS5500 Computer Graphics April 24, 2006.
TWO DIMENSIONAL TRANSFORMATION
Presentation transcript:

1 Dr. Scott Schaefer 3D Transformations

2/149 Review – Vector Operations Dot Product

3/149 Review – Vector Operations Dot Product

4/149 Review – Vector Operations Dot Product

5/149 Review – Vector Operations Cross Product

6/149 Review – Vector Operations Cross Product

7/149 Review – Vector Operations Cross Product

8/149 Review – Vector Operations Cross Product

9/149 Review – Vector Operations Cross Product

10/149 Review – Vector Operations Cross Product

11/149 Review – Vector Operations Cross Product

12/149 Review – Vector Operations Cross Product

13/149 Review – Vector Operations Cross Product

14/149 Transformations Affine Transformations  Translation  Uniform Scaling  Non-uniform Scaling  Rotation  Mirror Image Projections  Orthogonal  Perspective

15/149 Translation

16/149 Uniform Scaling

17/149 Uniform Scaling

18/149 Uniform Scaling

19/149 Non-Uniform Scaling

20/149 Non-Uniform Scaling

21/149 Non-Uniform Scaling

22/149 Non-Uniform Scaling

23/149 Non-Uniform Scaling

24/149 Non-Uniform Scaling

25/149 Rotation

26/149 Rotation

27/149 Rotation

28/149 Rotation

29/149 Rotation

30/149 Rotation

31/149 Rotation

32/149 Rotation

33/149 Rotation

34/149 Mirror Image

35/149 Mirror Image

36/149 Mirror Image

37/149 Mirror Image

38/149 Mirror Image

39/149 Mirror Image Exactly the same as non-uniform scaling with !!!

40/149 Orthogonal Projection

41/149 Orthogonal Projection

42/149 Orthogonal Projection

43/149 Orthogonal Projection

44/149 Orthogonal Projection

45/149 Orthogonal Projection

46/149 Perspective Projection

47/149 Perspective Projection Plane:

48/149 Perspective Projection Plane: Line:

49/149 Perspective Projection Plane: Line:

50/149 Perspective Projection Plane: Line:

51/149 Perspective Projection Plane: Line:

52/149 Perspective Projection

53/149 Perspective Projection

54/149 Perspective Projection

55/149 Perspective Projection

56/149 Perspective Projection Perspective Projection is not defined for vectors!!!

57/149 Transformations as Matrices Exactly like 2D 4x4 matrices Requires coordinates…. 

58/149 Review – Vector Operations Dot Product

59/149 Review – Vector Operations Dot Product

60/149 Review – Vector Operations Cross Product

61/149 Review – Vector Operations Cross Product

62/149 Review – Vector Operations Cross Product

63/149 Review – Vector Operations

64/149 Review – Vector Operations

65/149 Review – Vector Operations

66/149 Translation

67/149 Translation

68/149 Uniform Scaling

69/149 Uniform Scaling

70/149 Uniform Scaling

71/149 Uniform Scaling

72/149 Uniform Scaling o = (0,0,0) T

73/149 Non-Uniform Scaling

74/149 Non-Uniform Scaling

75/149 Non-Uniform Scaling

76/149 Non-Uniform Scaling

77/149 Non-Uniform Scaling

78/149 Non-Uniform Scaling v = (1,0,0) T, o = (0,0,0) T

79/149 Rotation

80/149 Rotation

81/149 Rotation

82/149 Rotation

83/149 Rotation

84/149 Rotation

85/149 Rotation

86/149 Rotation

87/149 Rotation

88/149 Rotation Rotation about x

89/149 Rotation Rotation about y

90/149 Rotation Rotation about z

91/149 Mirror Image

92/149 Mirror Image

93/149 Mirror Image

94/149 Mirror Image

95/149 Mirror Image

96/149 Mirror Image

97/149 v = (0,0,1) T, o = (0,0,0) T Mirror Image

98/149 Orthogonal Projection

99/149 Orthogonal Projection

100/149 Orthogonal Projection

101/149 Orthogonal Projection

102/149 Orthogonal Projection

103/149 Orthogonal Projection

104/149 Orthogonal Projection v = (0,0,1) T, o = (0,0,0) T

105/149 Perspective Projection

106/149 Perspective Projection

107/149 Perspective Projection

108/149 Perspective Projection Perspective transformations are not Affine!!! Rational expression requires a slight modification (homogeneous coordinates)

109/149 Perspective Projection Perspective transformations are not Affine!!! Rational expression requires a slight modification (homogeneous coordinates)

110/149 Perspective Projection Perspective transformations are not Affine!!! Rational expression requires a slight modification (homogeneous coordinates)

111/149 Perspective Projection Perspective transformations are not Affine!!! Rational expression requires a slight modification (homogeneous coordinates) 3D location is

112/149 Perspective Projection

113/149 Perspective Projection

114/149 Perspective Projection e = (0,0,1) T, o = (0,0,0) T, v = (0,0,1) T

115/149 Hierarchical Animation Tree of transformation matrices Each node stores a local transformation with respect to its parent

116/149 Hierarchical Animation Tree of transformation matrices Each node stores a local transformation with respect to its parent

117/149 Hierarchical Animation Tree of transformation matrices Each node stores a local transformation with respect to its parent

118/149 Hierarchical Animation Tree of transformation matrices Each node stores a local transformation with respect to its parent

119/149 Skeletal Animation

120/149 Skeletal Animation

121/149 Skeletal Animation : Bone Transformation

122/149 Skeletal Animation : Skin Weights : Bone Transformation

123/149 Skeletal Animation : Skin Weights : Bone Transformation Image taken from [Wang et al. 2002]

124/149 Skeletal Animation Examples

125/149 Skeletal Animation Examples

126/149 Skeletal Animation Examples

127/149 Transformations in OpenGL Types of transformation matrices  View  Model  Projection  Viewport

128/149 Types of transformation matrices  View  Model  Projection  Viewport Transformations in OpenGL

129/149 Transformations in OpenGL Types of transformation matrices  View  Model  Projection  Viewport

130/149 Transformations in OpenGL Types of transformation matrices  View  Model  Projection  Viewport

131/149 Transformations in OpenGL Types of transformation matrices  View  Model  Projection  Viewport

132/149 OpenGL: Matrix Commands glTranslatef(x, y, z) glScalef(x, y, z) glRotatef(theta, vx, vy, vz) glLoadIdentity(void) glPushMatrix(void)/glPopMatrix(void)

133/149 OpenGL: Matrix Example glTranslatef(0, 1, 3)

134/149 OpenGL: Matrix Example glTranslatef(0, 1, 3) glRotatef(45, 0, 1, 0)

135/149 OpenGL: Matrix Example glTranslatef(0, 1, 3) glRotatef(45, 0, 1, 0) glScalef(1, 1, 2)

136/149 OpenGL: Matrix Example glTranslatef(0, 1, 3) glRotatef(45, 0, 1, 0) glScalef(1, 1, 2) OpenGL multiplies matrices in the opposite order of what you might expect

137/149 Coordinate Systems in OpenGL

138/149 Coordinate Systems in OpenGL

139/149 Coordinate Systems in OpenGL

140/149 Coordinate Systems in OpenGL

141/149 Coordinate Systems in OpenGL

142/149 Coordinate Systems in OpenGL

143/149 Coordinate Systems in OpenGL

144/149 Coordinate Systems in OpenGL

145/149 Coordinate Systems in OpenGL

146/149 Coordinate Systems in OpenGL 1.PushMatrix 2.Specify viewer using inverse of view transformation 3. PushMatrix 4. Position object with transformations in opposite order of what you would expect 5. PopMatrix 6. PopMatrix

147/149 Coordinate Systems in OpenGL 1.PushMatrix 2.Specify viewer using inverse of view transformation 3. PushMatrix 4. Position object with transformations in opposite order of what you would expect 5. PopMatrix 6. PopMatrix

148/149 Coordinate Systems in OpenGL 1.PushMatrix 2.Specify viewer using inverse of view transformation 3. PushMatrix 4. Position object with transformations in opposite order of what you would expect 5. PopMatrix 6. PopMatrix

149/149 OpenGL: Special Matrix Commands glMatrixMode(GL_MODELVIEW / GL_PROJECTION) gluLookAt(ex, ey, ez, cx, cy, cz, ux, uy, uz) gluPerspective(fov, aspect, near, far) glOrtho(left, right, bottom, top, near, far) glViewport(x, y, w, h)

150/149

151/149 Hierarchical Animation Typically represented as relative joint locations and rotations

152/149 Hierarchical Animation Typically represented as relative joint locations and rotations

153/149 Hierarchical Animation Typically represented as relative joint locations and rotations

154/149 Hierarchical Animation Typically represented as relative joint locations and rotations

155/149 Hierarchical Animation Typically represented as relative joint locations and rotations

156/149 Hierarchical Animation Typically represented as relative joint locations and rotations