University of California
EECS Dept, CS Division

TA: Jordan Smith CS184: Foundations of
Computer Graphics
Prof. Carlo H. Séquin

CS 184: Discussion Section 1 Notes

Programming in a Windowed Environment

Topics

Interactive Windows Programming

Basic Introduction to OpenGL

OpenGL is the set of Graphics Library routines which we will be using throughout the semester. There is an on line OpenGL Reference Page if you do not have the recommended text.

Things to know to do HW #1:

Basic Introduction to SLIDE

# SLIDE Description of a Square

#############################
# Geometry Specification

point p0 ( 0.75 0.75 0 )
endpoint
point p1 ( 0.25 0.75 0 )
endpoint
point p2 ( 0.25 0.25 0 )
endpoint
point p3 ( 0.75 0.25 0 )
endpoint

face fSquare ( p0 p1 p2 p3 )
endface

object oSquare ( fSquare )
solid SLF_HOLLOW
shading SLF_WIRE
endobject

#############################
# Viewing Specification

camera cam
projection SLF_PARALLEL
frustum ( -0.5 -0.5 -2 )
( 0.5 0.5 -0.01 )
endcamera
group gCam
instance cam
id iCam
translate ( 0.5 0.5 1 )
endinstance
endgroup

window win
endwindow

viewport vp win
endviewport

render vp gCam.iCam.cam oSquare
endrender

Other Questions/Issues about HW1