University of British Columbia CPSC 314 Computer Graphics May-June 2005 Tamara Munzner Introduction Intro, Math Review, OpenGL Pipeline Week 1, Tue May 10 http://www.ugrad.cs.ubc.ca/~cs314/Vmay2005 � Expectations Course Structure � 45% programming projects � hard course! � 9% project 1 (building beasties with cubes and math) � heavy programming and heavy math � 9% project 2 (flying ) � fun course! � 9% project 3 (shaded terrain) � graphics programming addictive, create great demos � 18% project 4 (create your own graphics game) � programming prereq � 25% final � CPSC 216 (Program Design and Data Structures) � 15% midterm (week 4, Tue 5/31) � course language is C++/C � 15% written assignments � math prereq � 5% each HW 1/2/3 � MATH 200 (Calculus III) � programming projects and homeworks synchronized � MATH 221/223 (Matrix Algebra/Linear Algebra) � � Programming Projects Late Work � structure � 3 grace days � C++, Linux � for unforeseen circumstances � OK to cross-platform develop on Windows � strong recommendation: don’t use early in term � OpenGL graphics library � handing in late uses up automatically unless you tell us � otherwise: 25% per 24 hours � GLUT for platform-independent windows/UI � no work accepted after solutions handed out � face to face grading in lab � exception: severe illness or crisis, as per UBC rules � Hall of Fame � let me know ASAP (in person or email) � project 1: building beasties � must also turn in form with documentation � previous years: elephants, birds, poodles http://www.ugrad.cs.ubc.ca/~cs314/Vjan2005/illness.html � project 4: create your own graphics game � � Page 1 1
Regrading Course Information � to request assignment or exam regrade � course web page is main resource � must submit detailed written explanation of � http://www.ugrad.cs.ubc.ca/~cs314/Vmay2005 why you think the grader was incorrect for the � updated often, reload frequently particular problem that you are disputing � newsgroup is ubc.courses.cpsc.414 � I may regrade entire assignment � note old course number still used � thus even if I agree with your original request, � readable on or off campus your score may end up higher or lower � (no WebCT) � � Labs Teaching Staff � attend two labs per week, 3 sessions each � instructor: Dr. Munzner � Tue/Thu 11-12, 3-4, 4-5 � tmm@cs.ubc.ca � Thursday afternoon better than Thu morning � office hrs in CICSR 011 � Tuesdays: example problems in spirit of � Mon 4:30-5:30 written assignments and exams � TAs: Warren Cheung, Greg Kempe � Thursdays: help with programming projects � wcheung@cs.ubc.ca � no deliverables � kempe@cs.ubc.ca � strongly recommend that you attend � use newsgroup not email for all questions that other students might care about � �� Required Reading Learning OpenGL � this is a graphics course using OpenGL � not a course *on* OpenGL � Fundamentals of Computer Graphics � upper-level class: learning APIs mostly on � Peter Shirley, AK Peters your own � only minimal lecture coverage � OpenGL Programming Guide, v 1.4 � basics, some of the tricky bits � OpenGL Architecture Review Board � OpenGL Red Book � v 1.1 available for free online � many tutorial sites on the web � nehe.gamedev.net � readings posted on schedule page �� �� Page 2 2
Plagiarism and Cheating Citation � don’t cheat, I will prosecute � cite all sources of information � insult to your fellow students and to me � web sites, study group members, books � programming and assignment writeups must be � README for programming projects individual work � end of writeup for written assignments � exception: project 3 can be team of two � http://www.ugrad.cs.ubc.ca/~cs314/Vmay2005/policies.html#plag � can discuss ideas, browse Web � but cannot just copy code or answers � you must be able to explain algorithms during face-to- face demo � or no credit for that part of assignment, possible prosecution �� �� What is Computer Graphics? What is CG used for? � create or manipulate images with computer � graphical user interfaces � this course: algorithms for image generation � modeling systems � applications � simulation & visualization �� �� What is CG used for? What is CG used for? � movies � computer games � animation � special effects �� �� Page 3 3
What is CG used for? What is CG used for? � images � virtual reality / immersive displays � design � advertising � art �� �� Real or CG? Real or CG? http://www.alias.com/eng/etc/fakeorfoto/quiz.html 1 2 1 2 �� �� Real or CG? Real or CG? 3 3 4 4 �� �� Page 4 4
This Course Other Graphics Courses � we cover � CPSC 424: Geometric Modeling � basic algorithms for � CPSC 426: Computer Animation � rendering – displaying models � (modeling – generating models) � CPSC 514: Image-based Modeling and � (animation – generating motion) Rendering � programming in OpenGL, C++ � CPSC 526: Computer Animation � we do not cover � CPSC 533A: Digital Geometry � art/design issues � CPSC 533B: Animation Physics � commercial software packages � CPSC 533C: Information Visualization �� �� Rendering Modelling Transformation: Object Placement � creating images from models � geometric objects � lines, polygons, curves, curved surfaces � camera � pinhole camera, lens systems, orthogonal � shading � light interacting with material � Pixar Shutterbug series � Williams and Siegel using Renderman, 1990 � www.siggraph.org/education/ materials/HyperGraph/shutbug.htm �� �� Perspective Projection Viewing Transformation: Camera Placement �� �� Page 5 5
Depth Cueing Depth Clipping �� �� Colored Wireframes Hidden Line Removal �� �� Hidden Surface Removal Per-Polygon Shading �� �� Page 6 6
Gouraud Shading Specular Reflection �� �� Phong Shading Curved Surfaces �� �� Complex Lighting and Shading Texture Mapping �� �� Page 7 7
Displacement Mapping Reflection Mapping �� �� Modelling Animation � generating models � generating motion � lines, curves, polygons, smooth surfaces � interpolating between frames, states � digital geometry �� �� Reading � FCG Chapter 2: Miscellaneous Math � except for 2.11 (covered later) � skim 2.2 (sets and maps), 2.3 (quadratic eqns) � important: 2.3 (trig), 2.4 (vectors), 2.5-6 (lines) Math Review 2.10 (linear interpolation) � skip 2.5.1, 2.5.3, 2.7.1, 2.7.3, 2.8, 2.9 � FCG Chapter 4.1-4.25: Linear Algebra � skim 4.1 (determinants) � important: 4.2.1-4.2.2, 4.2.5 (matrices) � skip 4.2.3-4, 4.2.6-7 (matrix numerical analysis) �� �� Page 8 8
Textbook Errata Notation: Scalars, Vectors, Matrices a � list at http://www.cs.utah.edu/~shirley/fcg/errata � scalar � (lower case, italic) � p 29, 32, 39 have potential to confuse [ ] � vector a = a a ... a 1 2 n � (lower case, bold) � matrix � � a a a � (upper case, bold) � 11 12 13 � A = a a a � � 21 22 23 � � a a a � � 31 32 33 �� �� Vectors Column vs. Row Vectors [ ] � arrow: length and direction � row vectors a = a a ... a row 1 2 n � oriented segment in nD space � � a 1 � column vectors � offset / displacement � � a � � 2 � location if given origin a = � � col ... � � � a � n � switch back and forth with transpose T a = a col row �� �� Vector-Vector Addition Vector-Vector Subtraction � add: vector + vector = vector � subtract: vector - vector = vector � � u − v 1 1 � � � parallelogram rule u − v = u − v � � 2 2 � tail to head, complete the triangle v � � � � u − v 3 3 geometric algebraic u − v � � (3,2) − (6,4) = ( − 3, − 2) u + v u + v v 1 1 � � (2,5,1) − (3,1, − 1) = ( − 1,4,0) u − v = u + v = u + v � � 2 2 u + ( v − ) u � � � � u + v 3 3 ( 3 , 2 ) + ( 6 , 4 ) = ( 9 , 6 ) examples: ( 2 , 5 , 1 ) + ( 3 , 1 , − 1 ) = ( 5 , 6 , 0 ) �� �� Page 9 9
Recommend
More recommend