OpenGL § Write a short programming segment that draws the triangle fan shown below. You do not have to worry about setting projections, opening windows, setting the camera, transformations, …. Just the code to draw the triangle fan. Make sure triangles are in counterclockwise order (0,1) (-3,3) (-1,5) (1,4) (3,2)
Vector Programming § Given the arrays vec3f vertices[NUM_VERTICES]; // float vec3i indices[NUM_TRIANGLES]; // integer § Write a procedure that returns the per-face normal vector for a face with number index vec3 computeFaceNormal(int index) { }
Vector Programming § Given the arrays vec3f vertices[NUM_VERTICES]; // float vec3i indices[NUM_TRIANGLES]; // integer § Write a procedure that returns the per-vertex normal vector for a vertex with number index vec3 computeVertexNormal(int index) { }
Mesh Data Structure Define a mesh data structure able to store: § vertex/faces, § normals per face, and § texture coordinates. You worked with one like this in your project 4.
Mesh Data Structure § Store values in the mesh data structure to define a right-angled triangle at coordinates [0, 0, 0]. Legs are aligned to axis X and Y, respectively. Its length is 50.
Textures § Given the BMP image shown below. Store values in the mesh data structure to apply a texture to the triangle defined above and make it looks like shown in the second image below BMP file Model
Materials § Is the shininess value for chrome greater than or lower than rubber? __________________ § Are the diffuse constants for pearls greater than or lower than plastic (black)? __________ § Are the specular constants for metals greater than or lower than pearl? ________________
Navigation § Make the camera move autonomously from point A to point B. Given that the method scenario() return a display list with the four buildings described below. Buildings are 100x100x100 units
Frame Buffer How many bits does a frame buffer need for: § 1024 x 768 resolution § RGB values and alpha values and 8 bit z- buffer How many bytes does a frame buffer need for: § 1000 x 1000 resolution § RGBA values § Double buffering
OpenGL § Write the glut command to request a display mode that has: double buffering and RGBA color values. § Write the glut command to request a display mode that has: single buffering and RGB color values