Download presentation
Presentation is loading. Please wait.
1
Interactive Computer Graphics Introduction
James Gain and Edwin Blake Department of Computer Science University of Cape Town July 2002 Collaborative Visual Computing Laboratory
2
Interactive Computer Graphics Contents
Map of the Lecture Applications of Computer Graphics Graphics Systems Evolution of Computer Imagery Course Information Topics Practicals Background Reading Marks 28/11/2018 Interactive Computer Graphics Contents
3
Applications of Computer Graphics I
A driving force behind CG innovation Display of Information Floor plans in Architecture Maps in GIS Imaging in Medicine Scientific and Financial Visualization Digital Publishing Design Architecture Mechanical Parts VLSI Circuits Display - exploit the human visual systems ability to process data and recognize patters Design - from specification, through iterative design, to automated analysis 28/11/2018 Interactive Computer Graphics Contents
4
Applications of Computer Graphics II
Simulation Virtual Reality Training (flight, surgery, etc.) Robotics Research Games Special Effects and Animation for Film User Interfaces WIMP Internet Browsers Innovative Interfaces VR Training - replaces hazardous or expensive training situations 28/11/2018 Interactive Computer Graphics Contents
5
Interactive Computer Graphics Contents
A Graphics System Elements of a CG System: Processor, Memory, Frame Buffer Input Devices, Output Devices Most PC systems have all these components, but often have specialized graphics processors 28/11/2018 Interactive Computer Graphics Contents
6
Pixels and the Frame Buffer
Raster (as opposed to vector) Display Picture swept out in horizontal rows Pixels (picture elements) Squares of a uniform colour on a grid Frame buffer Memory store of pixels Depth Number of bits used for a pixel True colour has >= 24 bits Often use RGB, a combination of red, green, blue primaries Rasterization (scan conversion) converting geometric primitives (lines, polygons) to pixels 28/11/2018 Interactive Computer Graphics Contents
7
Interactive Computer Graphics Contents
Output Devices Cathode-Ray Tube (CRT) Electron beam steered by deflection plates to strike and activate phosphors Only emits for milliseconds and needs to be refreshed Refresh Rate Sufficlently high redisplay to avoid flicker Interlacing displays odd and even rows alternately Colour Displays a triad of coloured phosphors A shadow mask ensures only the correct phosphors are excited 28/11/2018 Interactive Computer Graphics Contents
8
Interactive Computer Graphics Contents
Input Devices Keyboard Input characters “QWERTY” originally designed to slow typists down 2-D Locators: Mouse, light pen, data tablet 3-D Locators Trackers, 3-D Mouse Haptics (Force Feedback) Phantom Data can also be input from dials, switches, digital camera 28/11/2018 Interactive Computer Graphics Contents
9
Interactive Computer Graphics Contents
A Sequence of Images I Wireframe Flat Shaded 28/11/2018 Interactive Computer Graphics Contents
10
Interactive Computer Graphics Contents
A Sequence of Images II Textured Smooth Shaded 28/11/2018 Interactive Computer Graphics Contents
11
A Sequence of Images III
Modelling: Set Operations 28/11/2018 Interactive Computer Graphics Contents
12
Interactive Computer Graphics Contents
Final Image 28/11/2018 Interactive Computer Graphics Contents
13
Interactive Computer Graphics Contents
Exercise: Realism Question: Consider some recent computer animated films (Shrek, Toy Story 2, Final Fantasy, Ice Age). Which aspects do you feel where particularly realistic and which unrealistic? Try to name particular scenes. Answer: - + Subsurface lighting (skin, milk, etc) Hair Facial animation and lip synching Complex shapes Perfection (no dust, dirt and dents) Physical effects (wind, water, fire, cloth) 28/11/2018 Interactive Computer Graphics Contents
14
Interactive Computer Graphics Contents
Image Formation Combining objects and viewers to produce an image Objects: Exist independently of image formation Constructed from geometric primitives (vertices) Viewers: Form the 2-D image of the objects from a particular perspective Object and viewer are 3-D, image is 2-D 28/11/2018 Interactive Computer Graphics Contents
15
Interactive Computer Graphics Contents
Light and Images Light interacts with objects and a portion enters the camera lense or eye Visible light has wavelengths in the range nm CG often assumes point light sources that emit constant intensity light from a single location CG often ignores the wave nature of light 28/11/2018 Interactive Computer Graphics Contents
16
Interactive Computer Graphics Contents
Ray Tracing Rays (semi-infinite lines) are traced from the light source. Some of them eventually strike the image plane Light may be reflected, scattered or refracted as it strikes objects Ray tracing is based on this principle but is (arguably) too computationally costly in many cases A simple approximation is to assume uniform ambient light levels 28/11/2018 Interactive Computer Graphics Contents
17
Interactive Computer Graphics Contents
Human Visual System Cones: Central high resolution colour Three types, roughly r, g, b Rods: peripheral low resolution monochromatic Visual acuity measures how closely two point can be placed and still distinguished Respond differently to different wavelengths according to the CIE standard observer curve Signal sent along optic nerves to visual cortex for very sophisticated high-level processing 16000 pixels across high at 15 cm range 28/11/2018 Interactive Computer Graphics Contents
18
The Synthetic Camera Model
Computer generated and optical (camera) image formation are equated Image of a point is found by drawing a line from the point through the centre of projection of the lense onto the projection plane CG moves the projection plane in front of the camera and uses a clipping window to limit the size of the image Together the centre of projection, projection plane and clipping window define the image 28/11/2018 Interactive Computer Graphics Contents
19
Application Programmer’s Interface
Shield a programmer from the underlying hardware and software Provide a system metaphor (the synthetic camera model) Examples: OpenGL, PHIGS, Direct3D, Java-3D API needs to allow specification of: Objects Viewer Light Sources Material Properties OpenGL code for a triangle glBegin(GL_POLYGON); glVertex3f(0.0, 0.0, 0.0); glVertex3f(0.0, 1.0, 0.0); glVertex3f(0.0, 0.0, 1.0); glEnd(); 28/11/2018 Interactive Computer Graphics Contents
20
The Modelling-Rendering Paradigm
Modelling of the scene can be separated from production of the image Different requirements (modelling - interactive, rendering - high quality) Objects are viewer independent Leads to specialisation (e.g. RenderMan renderer and FreeForm modeller) Dominant in CAD and SFX Approach adopted in this course (rendering first half, modelling second half) 28/11/2018 Interactive Computer Graphics Contents
21
Graphics Architectures
For efficiency implement much of the graphics API in hardware Display processors: Unburden the host processor Compile primitives as a display list rendered by the display processor Pipeline Architectures: Increases throughput where a sequence of identical operations are applied to a stream of data Geometry has this property 28/11/2018 Interactive Computer Graphics Contents
22
Interactive Computer Graphics Contents
Geometric Pipeline Transformations: Need to transform from object to camera to screen coordinates Encoded as a 4x4 matrix Clipping: Limited field of view so cut geometry against the clipping rectangle Projection: Flatten objects from 3-D to 2-D Rasterization: Convert objects to pixels in the frame buffer But need to balance latency (time for a single datum to pass) against throughput (rate at which datum are output) 28/11/2018 Interactive Computer Graphics Contents
23
Interactive Computer Graphics Contents
Course Information Interdisciplinary (little bits of physics, maths, psychology, engineering) Sufficient to be an independent practitioner 3rd period, Room 302 (alternates with CPL/PLT) 30 lectures Course information on the WWW: Lecturers: Dr James Gain Prof Edwin Blake Textbook: “Interactive Computer Graphics: A Top-Down Approach with OpenGL” (2nd ed.), E. Angel, Addison-Wesley, 2000 Automobile analogy 28/11/2018 Interactive Computer Graphics Contents
24
Interactive Computer Graphics Contents
Topics Introduction - ch. 1 Graphics Programming (Basic OpenGL) - ch. 2 Geometric Objects and Transformations - ch. 4 Viewing - ch. 5 Shading - ch. 6 Implementation of a Renderer - ch. 7 Hierarchical and Object-Oriented Graphics - ch. 8 Input and Interaction - ch. 3 Discrete Techniques - ch. 9 Curves and Surfaces - ch. 10 Procedural Methods - ch. 11 Modelling - additional topic Special Effects - additional topic 28/11/2018 Interactive Computer Graphics Contents
25
A Guide to Surviving the Mathematics
Contrary to expectations CG does not require advanced maths Master the mathematics before the course (do exercise 0) Mostly Linear Algebra Vectors addition dot product, cross product Line equations, plane equations, normals Matrices, transformations Curves and approximations polynomials circles, ellipses, parabolas parameters, functions 1. Find the dot products for the following pairs of vectors: a. (1,1,1) • (1,1,-1) b. (2,5,3) • (2,5,3) c. (1,0,0) • (10,1,5) 2. Find the length of the vector (2,5,3). 3. Let i = (1,0,0), j = (0,1,0) and k = (0,0,1). By considering the meaning of cross product (´) write down the answers to: i ´ i, j ´ j, k ´ k, i ´ j, j ´ i , i ´ k , k ´ i, j ´ k, k ´ j 4. Using the result in 3. and the fact that (x,y,z) = xi + yj + zk find an expression for p ´ q where p = (x1, y1, z1) and q = (x2, y2, z2). Hence find the cross products for each of (a), (b), (c) in 1. 5. The equation of a plane is ax + by + cz = d. (Under what circumstances will d=0?). Find a,b,c,d for each of the cases: a. The plane is the XY axis. b. The plane is the XZ axis. c. The plane is the YZ axis. d. The plane is parallel to the XY axis and of distance D from the origin. 6. Describe the geometric meaning of the planes: a. x = y b. x+y = 0 c. x+y+z = 0 d. x+y+z = 1 7. Find the equation of the plane which passes through the following three points: (1,0,0), (0,1,0), (0,0,1). 8. In general given the points (x1, y1, z1), (x2, y2, z2), (x3, y3, z3) find the equation of the plane which passes through these points, by using the plane equation ax + by + cz = d. 28/11/2018 Interactive Computer Graphics Contents
26
Interactive Computer Graphics Contents
Further Reading The Graphics Bible: “Computer Graphics: Principles and Practice” (2nd ed), J.D. Foley, S.K. Feiner, A. van Dam, J.F. Hughes, Addison-Wesley, 1996 ACM Digital Library Computer Bibliography Database SIGGRAPH Conference Proceedings Journals (Transactions on Graphics, etc) IEEE Computer Society: Computer Graphics and Applications Magazine Transactions on Computer Graphics and Visualization Eurographics: Computer Graphics Forum 28/11/2018 Interactive Computer Graphics Contents
27
Interactive Computer Graphics Contents
Practicals Available on the WWW: 3 Practicals: Shading: Glut, Phong & Gouraud Shading (3 weeks) Scene Graph: OpenGL, Coordinate Transformations, Perspective (4 weeks) Animation (3 weeks) Time estimate depends on your knowing the material! Tutor: Matthew Hampton Copying: All practicals must be entirely your own work You may not copy from previous years 28/11/2018 Interactive Computer Graphics Contents
28
Interactive Computer Graphics Contents
Mark Breakdown 3 practicals, 1 test, 1 final exam Practical work 35% Class test 15% Examination 50% Final exam: One and a half hours Open Book 1 compulsory question choice of 2 out of 3 remaining 28/11/2018 Interactive Computer Graphics Contents
29
Interactive Computer Graphics Contents
Life After the Exam Hey, I want to do more Computer Graphics! Honours Visualization Advanced Graphics Useability Virtual Reality Image Processing Outside Small firms (WEB !) Further study overseas Masters — Collaborative Visual Computing Lab: Collaborative Virtual Environments; Computer Graphics; Cooperative Visualization; Usability and Human Computer Interaction Web-based applications; Medical Imaging 28/11/2018 Interactive Computer Graphics Contents
Similar presentations
© 2025 SlidePlayer.com Inc.
All rights reserved.