Title: Computer Graphics
1Computer Graphics Modeling and Transformations
- Erik Brisson
- ebrisson_at_bu.edu
2Human view of physical world
3Human view of image
4Computer graphics paradigm
5C.G. paradigm with light
6C.G. basic calculation
7Resulting image
8Result is a digital image
9Model geometry two cuboids
10Model geometry - approximation
11Geometric elements in 3D
12Review from graph paper lecture
Example of hquad hquad, name 2,
2, 2, 4, 4, 4, 4, 2
13Generalization
Vertices P1 (2, 2) P2 (2, 4)
P3 (4, 4) P4 (4, 2) Face F0 P1,
P2, P3, P4
14More examples
Vertices P1 (4.0, 2.0) P2 (2.0,
2.0) P3 (2.0, 4.0) P4 (4.0, 4.0)
P5 (6.0, 3.0) P6 (4.0, 1.0) P7
(7.0, 1.0) P8 (8.0, 2.0) Faces F1
P1, P2, P3, P4 F2 P1, P4, P5 F3
P7, P6, P1, P5, P8
15Computer representation
Vertices 1 4.0, 2.0 2 2.0, 2.0 3
2.0, 4.0 4 4.0, 4.0 5 6.0, 3.0 6
4.0, 1.0 7 7.0, 1.0 8 8.0, 2.0 Faces
1 1, 2, 3, 4 2 1, 4, 5 3 7, 6, 1, 5,
8
16Note edges
Edges 1 1, 2 2 2, 3 3 3, 4 4
4, 1 5 4, 5 6 1, 5 7 5, 8 8
8, 7 9 7, 6 10 1, 6
17Translation and rotation in 2D
(B) Rotate by 45 degrees
Translate by (7.0, 4.0) (A)
Translate by (5.0, 1.0)
18Composition of transformations
Rotate 45 degrees CCW
Translate (2, 0)
19Composition of transformations
Translate (2, 0)
Rotate 45 degrees CCW
20Compare
Rotate first Then translate Translate
first Then rotate
21Rigid body transformations
22Other transformations - scaling
23Points in 3D
P1 (4.1, 1.6, 2.8)
24Geometric elements in 3D
25Objects in 3D
Vertices P1 (0.0, 0.0, 2.7) P2 (1.0,
0.0, 0.5) P3 (0.998, 0.156, 0.5) P4
(0.951, 0.309, 0.5) P5 (0.891, 0.454, 0.5)
Faces F1 P1, P2, P3 F2 P1,
P3, P4 F3 P1, P4, P5
26Rotations in 3D
27Translations in 3D
Sphere translated by (-3.0, 2.0,
-4.5) Blue cube translated by (2.0,
0.0, -4.0) rotated 60 deg around
y-axis Purple cube translated by
(0.0, 0.0, 0.0)
28Now we can build, move, rotate, and scale
doughnuts