Introduction to Computer Graphics
Personal information Prof. Ludovit Niepel Computer Science Department, office 26B web page: http://sites.google.com/site/niepel3/ e-mail: niepel@gmail.com Phone - extension: 5321
Textbook: Course Textbook: F.S.Hill,Jr. Computer Graphics - using Open GL. Prentice-Hall 2-nd or 3-rd ed. 2001-2006 Recommended Textbook: OpenGL programming Guide. (Red book) Addison-Wesley Pub. 1997-2008 (exists on-line version)
Office hours: Sun: 14-15 Mon:11-12 Tue: 9-11 Wed: on demand Thu: 14-15 subject to change
Course Details Course evaluation: Homework and quizzes 20% Project 10% Midterm 30% Final 40% Dates: Homework to be announced when assigned Project to be announced when assigned Midterm NOV-16 8-9:15 Final JAN-03 14:00- 16:00
Introduction CS 455
What is Computer Graphics? Different meanings – simplest definition: “pictures that ere generated by computers”. Tools to create pictures generated by computer.
Basic notions Computer graphics – process of producing a picture or image using the computer Computer interfaces popular on personal computers Desktop publishing Realistic images generated using mathematical and physical methods
Graphics Applications Entertainment: Games GT Racer 3 Polyphony Digital: Gran Turismo 3, A Spec
Graphics Applications Entertainment: Cinema Square: Final Fantasy Pixar: Monster’s Inc.
Areas of Applications Entertainment Movies Games Technical and business applications
Graphics Applications Computer Aided Design (CAD)
Computer-Aided Design; Training Electronic blueprints Architectural CAD Mechanical CAD Electronic CAD Visual simulation and Training Apollo spacecraft Flight simulators Ship Automobile and driving simulators Surgical simulation
Digital Media Technologies Traditional media (analog to digital transition) -Desktop publishing and printing -Digital photography -Digital video and HDTV “New” media experiences -Multimedia personal computer -Networked graphics and the www -Photo (flickr) and video sharing (youTube)
Visualization Interdisciplinary: Theory & Practice Mathematics, science, engineering, medicine, … Education Interdisciplinary: Theory & Practice Science Physics of light, color and appearance Geometry and perspective Mathematics of curves and surfaces Engineering Hardware: Graphics/media processors Software: Graphics libraries, window systems Art and Perception Color: harmony and perception Composition, lighting, ...
Graphics Applications Medical Visualization The Visible Human Project MIT: Image-Guided Surgery Project
Graphics Applications Scientific Visualization
Graphics Applications Everyday Use Microsoft’s Whistler OS will use graphics seriously Graphics visualizations and debuggers Visualize complex software systems
The Basics Computer graphics: generating 2D images of a 3D world represented in a computer. Main tasks: modeling: (shape) creating and representing the geometry of objects in the 3D world rendering: (light, perspective) generating 2D images of the objects animation: (movement) describing how objects change in time
Steps for creating a picture Creating a model Perform necessary transformation Lighting and rendering the object The goal is the creation of an image by writing a program instead of taking a picture with a camera There exists an analogy between writing graphical programs and taking pictures by a camera
Graphical User Interfaces Desktop metaphor Input: Lightpen, mouse, keyboard Output: CRT, printer Immersive interfaces Virtual reality Input: 3D tracking, gloves Output: HMD, projection display
Display Technologies Cathode Ray Tubes (CRTs) Most common display device today Evacuated glass bottle Extremely high voltage Heating element (filament) Electrons pulled towards anode focusing cylinder Vertical and horizontal deflection plates Beam strikes phosphor coating on front of tube
Display Technologies: CRTs Vector Displays Early computer displays: basically an oscilloscope Control X,Y with vertical/horizontal plate voltage Often used intensity as Z Name two disadvantages Just does wireframe Complex scenes visible flicker
Display Technologies: CRTs Raster Displays Raster: A rectangular array of points or dots Pixel: One dot or picture element of the raster Scan line: A row of pixels
Display Technologies: CRTs Raster Displays Color television: an oscilloscope with a fixed scan pattern: left to right, top to bottom To paint the screen, computer needs to synchronize with the scanning pattern of raster Solution: special memory to buffer image with scan-out synchronous to the raster. We call this the framebuffer.
Pixels Pixel or “Picture element” is the simplest element in computer graphics Single location on the computer screen or printout Value of each pixel is the range from white to black or range of intensities of red, green, blue (RGB) colors.
Frame buffers The pixels of an image are organized into two dimensional grid – frame buffer Multiple frame buffers can be stored in computer memory Double buffering – first image is drawn into frame buffer and sent to display. While the user is looking on the display, the next picture is drawing to the second buffer.
Windows Image don’t fill the entire screen but is drawn into a window Pixels are adressed within the window based on their location Relative position of each pixel enables moving the window and change its size
Realistic images Calculating pixel values to create impression of a realistic picture Simulation of objects from the real word Approximation of physical properties of objects Limitations given by computing time and memory space
The Graphics Pipeline Modeling – creates an internal representation of the objects in the scene Rendering – converts the screen description into image Display – shows the image on the output device
The Graphics Pipeline Model Transformation Object Specification Scene Description Scene Description Clipping and Hidden Surface Removal Model Transformation View and Light Specification Shading Image
The Graphics Pipeline cont. Image Display Transformation Output
Output primitives Points Lines Polylines Text Filled regions Raster images
Object modeling Model contains - shape of the object - material and physical properties - color, transparency, shiness - texture Different levels of complexity of modeling - polytopes with planar faces - curved lines and surfaces
Rendering The rendering process simulates the flow of light through the sceneas it interacts with the objects The presence of light lets to see objects in the world An illumination model approximates the way how light interacts with the object.
Camera model Model used in computer graphics to project 3D-objects to 2D-display Geometrical transformations simulate the role of camera Projection is represented by multiplications of transformation matrices
Coordinate systems World coordinate system View coordinate system Window coordinate system Object coordinate system Different kind of coordinates: -affine coordinates -homogenous coordinates - integer/real coordinates
Color models RGB model (red, green, blue ) for displays, additive model CMY model (cyan, magenta, yellow) for printers, subtractive model blue magenta cyan red black green yellow