CS488
More Geometric Transformations, Object Hierarchies, and some Fonts
Luc RENAMBOT
1
CS488 More Geometric Transformations, Object Hierarchies, and some - - PowerPoint PPT Presentation
CS488 More Geometric Transformations, Object Hierarchies, and some Fonts Luc R ENAMBOT 1 Previous Lectures Frame buffers Drawing a line (Midpoint Line Algorithm) Polygon Filling (Edge-table algorithm) Line Clipping
Luc RENAMBOT
1
2
3
4
5
6
(1,2) (3,2) (3,4) (1,4)
(-1,-1) (1,-1) (1,1) (-1,1)
7
8
(0,0) (2,2)
9
the 4 tires. We can either draw each of the 4 tires independently at the appropriate location, or draw the same tire centered at its origin 4 times, and each time move it to the appropriate location in the world
10
planet in orbit about it
Y=0 plane
11
12
matrix are done in the REVERSE order from which they are called:
Y-axis by the percentage of day that has
its center.
Y-axis by the percentage of year that has
13
Y-axis by the percentage of year that has passed turning its coordinate system in the process
Y-axis by the percentage of day that has
rotates about its center.
14
15
How can I draw the following scene?
16
17
18
19
20
#Inventor V2.1 ascii Separator { Separator { Translation { translation 0 -2 0 } Material { diffuseColor 0.8 0.2 0 } Cube { width 0.75 height 1.75 depth 0.75 } } Separator { Translation { translation 0 0.75 0 } Material { diffuseColor 0 0.8 0 } Cone { bottomRadius 1.4 height 4.3 }
21
#Inventor V2.1 ascii Separator { Separator { Material { diffuseColor 0 0.8 0 } Separator { IndexedTriangleStripSet { vertexProperty VertexProperty { vertex [ 0 -1.4 -1.4, 0 2.9 0, 0.535757 -1.4 -1.29343, 0.989949 -1.4 -0.989949, 1.29343 -1.4 -0.535757, 1.4 -1.4 6.11959e-08, 1.29343 -1.4 0.535757, 0.989949 -1.4 0.989949, 0.535757 -1.4 1.29343, 2.11394e-07 -1.4 1.4,
0 -1.4 0 ]
normal [ 0 0.309586 -0.950871, 0.363883 0.309586 -0.878491, 0.672368 0.309586 -0.672368, 0.878491 0.309586 -0.363883, 0.950871 0.309586 4.15639e-08, 0.878491 0.309586 0.363883, 0.672368 0.309586 0.672368, 0.363883 0.309586 0.878491, 1.43578e-07 0.309586 0.950871,
0 -1 0 ] materialBinding OVERALL normalBinding PER_VERTEX_INDEXED }
22
coordIndex [ 16, 0, 17, 2, 3, -1, 3, 4, 17, 5, 6, -1, 6, 7, 17, 8, 9, -1, 9, 10, 17, 11, 12, -1, 12, 13, 17, 14, 15, -1, 16, 17, 15, -1, 1, 1, 0, 2, -1, 1, 1, 2, 3, -1, 1, 1, 3, 4,
5, 6, -1, 1, 1, 6, 7, -1, 1, 1, 7, 8, -1, 1, 1, 8, 9, -1, 1, 1, 9, 10, -1, 1, 1, 10, 11, -1, 1, 1, 11, 12,
13, 14, -1, 1, 1, 14, 15, -1, 1, 1, 15, 16, -1, 1, 1, 16, 0, -1 ] normalIndex [ 16, 16, 16, 16, 16, -1, 16, 16, 16, 16, 16, -1, 16, 16, 16, 16, 16, -1, 16, 16, 16, 16, 16, -1, 16, 16, 16, 16, 16, -1, 16, 16, 16, -1, 15, 0, 0, 1, -1, 0, 1, 1, 2, -1, 1, 2, 2, 3,
4, 5, -1, 4, 5, 5, 6, -1, 5, 6, 6, 7, -1, 6, 7, 7, 8, -1, 7, 8, 8, 9, -1, 8, 9, 9, 10, -1, 9, 10, 10, 11,
12, 13, -1, 12, 13, 13, 14, -1, 13, 14, 14, 15, -1, 14, 15, 15, 0, -1 ] } } } Material { diffuseColor 0.8 0.2 0 } IndexedTriangleStripSet { vertexProperty VertexProperty { vertex [ -0.375 -1.125 0.375,
0.375 -1.125 0.375, 0.375 -2.875 0.375, 0.375 -1.125 -0.375, 0.375 -2.875 -0.375,
normal [ 0 0 1, 0 0 -1,
1 0 0, 0 1 0, 0 -1 0 ] texCoord [ ]
materialBinding OVERALL normalBinding PER_VERTEX_INDEXED } coordIndex [ 5, 3, 7, 1, -1, 2, 4, 0, 6, -1, 5, 4, 3, 2, -1, 1, 0, 7, 6, -1, 7, 6, 5, 4,
normalIndex [ 5, 5, 5, 5, -1, 4, 4, 4, 4, -1, 3, 3, 3, 3, -1, 2, 2, 2, 2, -1, 1, 1, 1, 1,
} }
23
24
25
shoulder, or just the lower arm about the elbow, or just the wrist or just a finger. If you rotate the entire arm then you want the rest of the arm parts to follow along as though they were joined like a real arm - if you rotate the arm then the elbow should come along for the ride
moving then the wheels should also be moving the same amount
26
27
be set to draw only as a wireframe, or with different lighting models, or different colors, or different texture
not have to be explicitly set each of them
28
29
30
31
00000000 00011000 00100100 01000010 01111110 01000010 01000010 01000010
32 A
33
34
35
36
37
38