Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Advanced Computer Graphics, Homework 1 Fall 2008 | CMSC 740, Assignments of Computer Graphics

Material Type: Assignment; Professor: Varshney; Class: ADV COMP GRAPHICS; Subject: Computer Science; University: University of Maryland; Term: Unknown 1989;

Typology: Assignments

Pre 2010

Uploaded on 02/13/2009

koofers-user-nmz
koofers-user-nmz 🇺🇸

10 documents

1 / 1

Toggle sidebar

Related documents


Partial preview of the text

Download Advanced Computer Graphics, Homework 1 Fall 2008 | CMSC 740 and more Assignments Computer Graphics in PDF only on Docsity! Assignment 1 CMSC 740, Fall 2008 Due: 9:30am Thursday, September 25, 2008 This assignment involves using OpenGL programming API with GLUT toolkit. The assignment web page is at http://www.cs.umd.edu/class/fall2008/cmsc740/assg1/ The goal of the assignment is to simulate a game of racing chickens.Compile and run the startup code from the above page after linking with OpenGL and GLUT. The startup code can be compiled on both Windows and Linux and does the following: - It opens up a GLUT window of size 800 × 600 - It displays a chicken at the center with shading calculated by its normal vectors. Refer to Smesh class in the startup code for the detailed implementation. - It provides a user interface library called iui for rotating and zooming by mouse. Refer to iui.pdf in the startup folder. Your goal in this assignment is to appropriately resize and orient the chicken on a racing track as shown in Figure 1 above. (a) Model and render a racing track and a fence. (3 Points) - The innermost lane of the track as an ellipse of semimajor axis 0.6 and semiminor axis 0.4. The width of each of the five lanes of the track is 0.06. Draw each lane using a GL_QUAD_STRIP and color in different shades (as shown in Figure 2). - Draw the fence by using GL_QUAD_STRIP and GL_LINE (wireframe) with a height of 0.1 (b) Scale the chicken to an appropriate size, deploy the chicken to one of the lanes, and orient it to look along the lane as in the Figure 1. (2 points) (c) Implement camera navigation around the track by adding rotation and translation. - Use “Page Up”/”Page Down” keys to rotate the camera to look up and down and use left/right arrow keys for sideways (left/right) viewing. Rotate 5 degrees for each key press. (3 Points). - Map translation forward and backwards to up/down arrow keys; moving 0.1 units for each key press. Here forward and backward are defined as the horizontal component of the direction the camera is looking at. (2 points) Special notes: - Refer to the demo version of our sample implementation of the assignment to resolve any ambiguities that might have remained in the above description. - Please feel free to change the startup code as needed. - The minor differences in colors and positions of objects between the demo program and your program will not affect the point of your assignment. Figure 1: Chicken on the racing track Figure 2: Racing track with 5 lanes and fence
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved