slide1
Download
Skip this Video
Download Presentation
Professor: James Davis Email: [email protected] TA : Indrani Chakravarty

Loading in 2 Seconds...

play fullscreen
1 / 6

Professor: James Davis Email: [email protected] TA : Indrani Chakravarty - PowerPoint PPT Presentation


  • 185 Views
  • Uploaded on

Introduction to Computer Graphics (CMPS 160-Lab, Fall -2007) http://www.soe.ucsc.edu/classes/cmps160/Fall07/. Professor: James Davis Email: [email protected] TA : Indrani Chakravarty Email: [email protected] Lab Tutors: Bryan Harris and Chirag Dave

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' Professor: James Davis Email: [email protected] TA : Indrani Chakravarty' - chibale


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
slide1

Introduction to Computer Graphics (CMPS 160-Lab, Fall -2007)http://www.soe.ucsc.edu/classes/cmps160/Fall07/

Professor: James Davis

Email: [email protected]

TA : Indrani Chakravarty

Email: [email protected]

Lab Tutors: Bryan Harris and Chirag Dave

Email: [email protected], [email protected]

Required Lab: M 10-12 or T 11-1

Optional Lab: W 10-12, Th 11-1

lab 0
Objective: To learn how to build an example program using open Graphics Library(openGL), and to compile and run it.

Example of output from gltest.c

Lab 0
opengl and glut
OpenGL and GLUT
  • OpenGL provides commands for
    • specifying geometric objects in 2 or 3 dimensions, e.g. points, lines, polygons, images etc, and
    • for controlling how these objects are drawn on the display (e.g. color).
  • OpenGL does not provide commands for performing windowing tasks or for obtaining user input. GLUT (the OpenGL Utility Toolkit) does.
  • The starter code gltest.c is a decent template for making any basic OpenGL program --
    • it has callbacks to support mouse, keyboard (currently empty function bodies) and
    • it demonstrates some animations and transformations.
tasks 1 compiling and running the code
Tasks (1) Compiling and Running the code
  • Download prog0.tgz from http://www.soe.ucsc.edu/classes/cmps160/Fall07/labs/lab0.html
  • Untar and unzip the file onto the local directory using
    • tar -xzvf prog0.tgz
  • Change the directory to prog0
    • cd prog0
  • Run the following and see the output
    • make
    • ./gltest
  • If you get an error while compiling
    • Open Makefile using any editor
    • Comment the following line and go back to Step 4
      • CFLAGS += -O3 -ffast-math -mtune=G5 -mcpu=G5
tasks 2 playing around with the code
Tasks (2) Playing around with the code
  • See the effect of the following changes to the code, and try understanding what’s happening --
    • Change the arguments of the Translation function and Rotation function
    • Change the
      • color of the teapot
      • color of the animations around the teapot
      • size of the teapot and the size of the animating cubes around the teapot
  • Find out what the following functions from the code do, and see their effect on the GUI --
    • cb_reshape
    • cb_keyboard
  • Understand the code gltest.c
for online help
For Online help
  • To know more about the openGL and GLUT functions used in this code,
    • Do a “man”. For example
      • $ man glRotatef
    • See the online copy of the RedBook on openGL at
      • http://www.opengl.org/documentation/red_book/
ad