COMP175: Computer Graphics Lecture 1 Introduction and Display Technologies
Course mechanics Number: COMP 175-01, Fall 2009 Meetings: TR 1:30-2:45pm Instructor: Sara Su (sarasu@cs.tufts.edu) TA: Matt Menke (mattmenke@gmail.com) Website: http://www.cs.tufts.edu/comp/175
What is computer graphics?
Computer Graphics: Applications Entertainment Film Computer games
Computer Graphics: Applications Entertainment Film Computer games Fine art and design
Computer Graphics: Applications Entertainment Film Computer games Fine art and design Science and engineering Computer-aided design Data visualization Simulation
Computer Graphics: Applications Entertainment Film Computer games Fine art and design Science and engineering Computer-aided design Data visualization Simulation New York Times infographic Communication Marketing, photojournalism Education, training Map of the Market, http://www.smartmoney.com/marketmap
Computer Graphics: Applications Entertainment Film Computer games Fine art and design Science and engineering Computer-aided design Data visualization Simulation Communication Marketing, photojournalism Education, training
Computer Graphics: Goals Make pretty pictures Convey information Sell something Provide understanding Tell a story 9
Computer Graphics: Means Mathematics: geometry, linear algebra, calculus Algorithms Rendering Modeling and simulation Design User interfaces and user interaction Story telling and presentation 10
COMP 175: Computer Graphics Digital image representation Modeling Create digital representations of shape, lighting, motion. Geometric transformation Place models in a scene. Map the scene to the camera s perspective. Rendering Compute a digital image of what the virtual camera sees. Advanced topics Animation, visualization, graphical user interfaces,... 11
Preview: 2D drawing Draw basic 2D primitives Lines, circles, filled polygons 12
Preview: Ray tracing Make high quality images of simple scenes Lighting and shadows Reflections on shiny objects Refraction through transparent objects Texture mapping M. Tabaczynski, 2005 A. Lauric, 2005 G. Filiotis, 2005 13
Preview: 3D rendering pipeline Graphics pipeline for complex scenes Transformations between coordinate spaces Model to camera space Camera to image space High quality triangle rendering Triangle rasterization Lighting effects Texture mapping Efficient processing Clipping Back face culling Hidden surface removal 14
Preview: 3D surfaces Model more advanced shape representations Bezier curves and surfaces Subdivision surfaces Implicit functions Volumetric image data 15
COMP 175: Computer Graphics Fundamental approaches and algorithms Programming assignments using OpenGL Prerequisites: Data Structures, Calculus, Linear Algebra Working knowledge of C If you are missing any of this, talk to us. Won t learn specific graphics apps or game engines But lots of freedom on final project 16
Reading Required text: Shirley and Marschner, Fundamentals of Computer Graphics, 3 rd ed., A K Peters, 2009. Recommended: Wright et al., OpenGL SuperBible: Comprehensive Tutorial and Reference, 4 th ed. Addison-Wesley, 2007. OpenGL programming references online Supplemental texts on reserve at Tisch Library see website 17
Evaluation Approximately: 60% Assignments Written exercises and programming projects Due on Thursdays start early! 5 late days to use over the term let us know when you plan to use one 20% Final project 10% Midterm exam October 27th, in class 10% Class participation 18
Accommodations To request an accommodation for a documented disability, you must register with the Disability Services Office at the beginning of the semester. Call (617) 627-2000 to arrange an appointment with Sandra Baer, Program Director of Disability Services. 19
Display technologies
Computer graphics systems Inputs Graphics Engine Output Presentation Lighting models Geometric models Scene description Geometry & Algorithms Modeling Transformations Rendering Images Display device 21
Calligraphic displays a.k.a. vector displays, stroke writers Move an electron beam to draw lines Standard in 1960s and 1970s: oscilloscopes, arcade games
Raster displays Most modern computer display devices are raster-based Illuminate the screen at a discrete set of locations: raster grid Each spot on the screen is a pixel Display 2D raster grid of locations 23
Raster displays Illuminate each location in the grid sequentially in raster scan order Scan one row at a time Scan a row from left to right Finish Slow scan direction Start Fast scan direction 24
Raster displays Each left-to-right trace is a scan line The beam is off during a retrace, when it is returning to screen left Finish Slow scan direction Start Fast scan direction 25
Raster displays Each location is indexed by an integer pair (i, j) i is the column of the raster j is the row Row j ( j,i) Column i 26
Raster displays The display resolution is the number of individual locations in the raster (#columns x #rows) e.g., typical monitor resolutions: 1024x768, 1280x1024 Number of rows Number of columns 27
Raster displays The display aspect ratio = horizontal size : vertical size Typical computer displays is 4:3 or 5:4 TV is 4:3 HDTV is 16:9 Number of rows Number of columns 28
Raster displays The display s dpi (dots per inch) is determined by the grid spacing Today s monitors are usually 72-130 dpi High-end cell phones and PDAs can be 200+ dpi Laser printer output is 300-1200 dpi Vertical grid spacing Horizontal grid spacing 29
Raster-based display technologies Different display technologies with trade-offs in image quality and user experience Focus on CRTs and LCDs CRT Cathode Ray Tube LCD Liquid Crystal Display 30
CRT displays Illuminated using cathode ray tubes Voltage applied to the cathode produces an electron beam. This beam is focused on a spot on the display screen. 31
CRT displays Illuminated using cathode ray tubes The screen is coated in phosphor, which emits light when excited. 32
CRT displays Illuminated using cathode ray tubes Graphics system controls voltage to the cathode number of electrons emitted amount of light energy emitted by the phosphor 33
CRT displays To display an image: Sweep the electron beam across the display screen in raster scan order (left to right, bottom to top) Adjust the voltage of the beam during the sweep to control the brightness at each location according to the image intensity Sweep the screen repeatedly at a high rate (e.g. 60 Hz) to refresh the image Why don t we see the beam moving? 34
Color CRT displays Different phosphors emit different wavelengths of light Coat screen with triads of phosphors Triad is smaller than what the eye can resolve Perceive triad as a single spot with a single color Phosphor triad Screen of phosphor dots Use three cathode ray tubes Focus each beam to align with the corresponding phosphor dot in the triad 35
Color CRT displays Eye combines three emitted wavelengths at each location and perceives them as a single color Different colors achieved by varying intensity of each component color (additive colors) 36
Blurriness in CRT displays The illuminated spot has a blurry boundary Electron beam has a Gaussian cross section Phosphor material is deposited with a Gaussian distribution Result: slightly blurry lines and edges Side effect: reduced aliasing artifacts 37
LCD devices Liquid Crystal Display Place a liquid crystal material between two sheets of polarized glass Incident light Light to viewer Polarized glass Liquid crystal Polarized glass Apply an electric field across the glass to control how much light can pass through the layers to the viewer 38
LCD devices Polarized glass Light can be polarized into two orthogonal directions Polarized glass only allows light of matching polarity to pass through Un-polarized light Light with polarity P Polarized glass with polarity P 39
LCD devices When polarized light reaches glass with the opposite polarity, no light passes through In the setup below, no light reaches the viewer Un-polarized light Light with polarity P No light passes Polarized glass with polarity P Polarized glass with polarity ~P 40
LCD devices Fill the space between the polarized glass with liquid crystals Etch each plate with parallel grooves in the direction of its polarity Polarized glass with polarity P Polarized glass with polarity ~P 41
LCD devices Liquid crystals near each plate tend to align themselves with etching Polarized glass with polarity P Polarized glass with polarity ~P 42
LCD devices Passive state Planes of liquid crystals between the plates gradually change direction Creates a smooth transition between the two plates Polarized glass with polarity P Polarized glass with polarity ~P 43
LCD devices Passive state Light with polarity P enters the liquid crystal Polarity converted to ~P as light passes through the twisted crystals Passes through the second polarized plate: screen appears bright! Un-polarized light Light with polarity ~P Polarized glass with polarity P Polarized glass with polarity ~P 44
LCD devices Active state Apply a voltage across the glass plates: liquid crystals align with the voltage Light polarity is not changed: screen appears dark! V Un-polarized light No light passes through Polarized glass with polarity P Polarized glass with polarity ~P 45
LCD devices Active state Control the amount of alignment by the voltage Control the amount of light passing through Control the brightness of the screen V Un-polarized light Some light passes through What does the alignment of the crystals look like? Polarized glass with polarity P Polarized glass with polarity ~P 46
Passive matrix LCD devices A grid of horizontal wires embedded in one glass plate A grid of vertical wires embedded in a second plate Voltages applied across the grids generate a localized electric field 47
Passive matrix LCD devices Location (i, j) is accessed by applying a voltage across the ith vertical wire and the jth horizontal wire Apply voltages in raster scan order to render an image Scan repeatedly to refresh the image j i 48
Active matrix LCD devices An array of thin film transistors is embedded in one sheet of glass Each transistor controls the electric field of a particular location Transistors can hold a charge don t need to be refreshed 49
Plasma display panel devices Many tiny cells between two panels of glass hold an inert mixture of noble gases The gas in the cells is electrically turned into a plasma Plasma excites phosphors to emit light Source: Wikipedia.org 50
Summary What you should remember from this lecture Boldfaced terms Calligraphic vs. raster displays How raster scanning works Operation of CRT and LCD displays Components of a computer graphics system Lighting models Geometric models Scene description Geometry & Algorithms Modeling Transformations Rendering Images Display device 51