

























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


























Computer Graphics Introduction to 3D Modeling
n Coordinate systems (left hand, right hand, openGL-way) n Basic shapes (cone, cylinder, etc) n Transformations/Matrices n Lighting/Materials n Synthetic camera basics n View volume n Projection
n Look in –ve direction (into +ve arrow) n CCW is +ve rotation
x
y
z
n Wireframe Models n Solid Models
n Cylinder: glutWireCylinder( ), glutSolidCylinder( ) n Cone: glutWireCone( ), glutSolidCone( ) n Sphere: glutWireSphere( ), glutSolidSphere( ) n Cube: glutWireCube( ), glutSolidCube( )
n Newell Teapot: (symbolic) n Dodecahedron, Torus
n generate sequence of points that define corresponding shape n centered at 0.
n Use generating functions n More work!!
n Generates a list of points and polygons for simple shapes n Spheres/Cubes/Sphere
glBegin(GL_QUADS) For each A = Angles{ glVertex3f(Rcos(A), Rsin(A), 0); glVertex3f(Rcos(A+DA), Rsin(A+DA), 0) glVertex3f(Rcos(A+DA), Rsin(A+DA), H) glVertex3f(Rcos(A), Rsin(a), H) }
// Make Polygon of Top/Bottom of cylinder
n Modelview matrix: n Projection matrix: n Viewport matrix:
n combination of modeling matrix M and Camera transforms V
n Different view volume shapes n Different visual effects
n Parallel n Perspective
n Scales and shifts each vertex in a particular way. n View volume lies inside cube of –1 to 1 n Reverses sense of z: increasing z = increasing depth n Effectively squishes view volume down to cube centered at 1
n Maps surviving portion of block (cube) into a 3D viewport n Retains a measure of the depth of a point
n Eye position n LookAt point n Up vector (if spinning: confusing)
n eye n lookAt
n gluLookAt (eye.x, eye.y, eye.z, look.x, look.y, look.z, up.x, up.y, up.z)
Base
Lower arm
Upper arm
Hammer
Root node
Leaf node
Object position and orientation can be affected by its parent, grand-parent, grand-grand-parent … nodes
Hierarchical representation
n (1) Absolute transformation: each part of the object is transformed independently relative to the origin
Translate the base by (5,0,0); Translate the lower arm by (5,00); Translate the upper arm by (5,00); …
x z
y