Date post: | 13-Jan-2016 |
Category: |
Documents |
Upload: | sylvia-bryan |
View: | 233 times |
Download: | 0 times |
Chun-Yuan Lin
Introduction to Computer Graphics
112/04/211 Ch00
In this course
112/04/21Ch002
Edward Angel,
"Interactive Computer Graphics: A Top-down approach using OpenGL,"
Fifth Edition, Addison Wesley, ISBN10:0-321-54943-0.
Donald Hearn, M. Pauline Baker,
"Computer Graphics with OpenGL,"
Third Edition, Prentice Hall, ISBN10:0-13-120238-3.
Alan Watt,
“3D Computer Graphics,”
Third Edition, Addison Wesley, ISBN10: 0-201-39855-9.
Interactive Computer Graphics: A Top-down approach using OpenGL
112/04/21Ch003
112/04/21Ch004
This book is an introduction to computer graphics, which an emphasis on applications programming.
Feature-length computer-animated movies have proved to be commercial and artistic successes.
Recent hardware has blurred the distinction between computers and game boxes. Programmable graphics processors provides a level of flexibility in commodity systems that was not available in even the most expensive workstations just a few years ago.
112/04/21Ch005
Within the last few years, the cost of a graphics systems that can generate over 100 million three-dimensional polygons per second with lighting and texture mapping has gone from over $100,000 to less than $1000.
The availability of commodity graphics boards for personal computers has been especially significant.
OpenGL remains the standard programmer’s interface both for writing application programs and developing high-level products for multiplatform applications.
Top down approach
112/04/21Ch006
Top-down, programming-oriented approach to introductory computer graphics.
Three approaches.The algorithmic approachThe survey approachThe programming approach.
Programming with OpenGL and C (1)
112/04/21Ch007
The greatest impediment to implementing a programming-orient course was the lack of a widely accepted graphics library or application programmer’s interface (API).
OpenGL is supported on all platforms now. (Windows, Apple Macintosh, Linux, …) (Computer Graphics: Principles & Practice in C 2/e, ISBN: 978-020-184-840-3)
This book is a textbook on computer graphics; it is not an OpenGL manual. (Another book- OpenGL: A Primer, Third Edition, 2008)
Programming with OpenGL and C (2)
112/04/21Ch008
In this book, I use both C and C++, with C as the dominant language. (OpenGL is not object-oriented)
Intended Audience
112/04/21Ch009
Prerequisites for the book are good programming skills in C or C++.
Understanding basic data structures (linked list, trees, array) and rudimentary knowledge of linear algebra and trigonometry.
Organization of this book (1)
112/04/21Ch0010
Chapter 1 provides an overview of the field and introduces image formation by optical devices.
Chapter 2 introduces programming using OpenGL.
Chapter 3, we discuss interactive graphics in a modern client-server setting and develop even-driven graphics programs.
Chapters 4 and 5 concentrate on three-dimensional objects.Chapter 4 for defining and manipulating three-
dimensional objectsChapter 5 for viewing them.
Organization of this book (2)
112/04/21Ch0011
Chapter 6 introduces light-material interactions and shading.
About 10 weeks.
Appendix A: Programs for chapter 1~6.Appendices B and C contain a review of the
background mathematics.Appendix D: a synopsis of the OpenGL functions
used in this book.
Support Materials
112/04/21Ch0012
www.cs.unm.edu/~angel or www.aw.com/cssupport
www.opengl.org
Computer Graphics with OpenGL
112/04/21Ch0013
112/04/21Ch0014
Today’s computer graphics research is concerned with improving the effectiveness realism and speed of picture generation.
To produce a realistic veiw of a natural scene, a graphics program must simulate the effects of actual light reflection and refraction from physical objects. (easy or complex)
Features
112/04/21Ch0015
We separated the discussions of two-dimensional and three-dimensional graphics techniques.
A major features of this book is the integration of three-dimensional and two-dimensional topics.
Many techniques discussed in this book, including parallel implementations for graphics algorithm.
Programming
112/04/21Ch0016
More than twenty complete C++ programs are provides in this book by using OpenGL packages.
Required Background
112/04/21Ch0017
Computer programming and data structures.
Mathematical methods for computer graphics algorithms.
Course outline
112/04/21Ch0018
Chapter 1 illustrates the diversity of computer graphics applications by taking a look at the many different kinds of pictures that people have generated with graphics software.
Chapter 2 presents the basic vocabulary of computer graphics and an introduction to the hardware and software components of graphics systems. (details of OpenGL)
Chapter 5 and Appendix A: geometric transformation and mathematics for computer graphics.
3D Computer Graphics
112/04/21Ch0019
Graphic Processing Units
112/04/21Ch0020
CG
The ChallengeRender infinitely complex scenesAnd extremely high resolutionIn 1/60th of one second
Luxo Jr. 1985 took 2-3 hours per frame to render on a Cray-1 supercomputer
Today we can easily render that in 1/30th of one secondOver 300,000x fasterStill not even close to where we need to be… but look how far
we’ve come!
112/04/2121
PC/DirectX Shader Model Timeline
Quake 3 Giants Halo Far Cry UE3Half-Life
1998 1999 2000 2001 2002 2003 2004
DirectX 6Multitexturing
Riva TNT
DirectX 8SM 1.x
GeForce 3 Cg
DirectX 9SM 2.0
GeForceFX
DirectX 9.0cSM 3.0
GeForce 6DirectX 5Riva 128
DirectX 7T&L TextureStageState
GeForce 256
22 CG 112/04/21112/04/21
CG
A quiet revolution and potential build-up Calculation: 367 GFLOPS vs. 32 GFLOPS Memory Bandwidth: 86.4 GB/s vs. 8.4 GB/s Until last year, programmed through graphics
API
GPU in every PC and workstation – massive volume and potential impact
GF
LOP
S
G80 = GeForce 8800 GTX
G71 = GeForce 7900 GTX
G70 = GeForce 7800 GTX
NV40 = GeForce 6800 Ultra
NV35 = GeForce FX 5950 Ultra
NV30 = GeForce FX 5800
23© David Kirk/NVIDIA and Wen-mei W.
Hwu, 2007ECE 498AL1, University of Illinois, Urbana-
Champaign112/04/21112/04/21
CG
16 highly threaded SM’s, >128 FPU’s, 367 GFLOPS, 768 MB DRAM, 86.4 GB/S Mem BW,
4GB/S BW to CPU
Load/store
Global Memory
Thread Execution Manager
Input Assembler
Host
Texture Texture Texture Texture Texture Texture Texture TextureTexture
Parallel DataCache
Parallel DataCache
Parallel DataCache
Parallel DataCache
Parallel DataCache
Parallel DataCache
Parallel DataCache
Parallel DataCache
Load/store Load/store Load/store Load/store Load/store
GeForce 8800
112/04/2124
CG
GPU NVIDIA GPU Computing Architecture
Via a separate HW interface In laptops, desktops, workstations, servers
8-series GPUs deliver 50 to 200 GFLOPSon compiled parallel C applications
Programmable in C with CUDA tools Multithreaded SPMD model uses
application data parallelism and thread parallelism
Tesla C870
Tesla S870
Tesla D870
© David Kirk/NVIDIA and Wen-mei W. Hwu, 2007ECE 498AL1, University of Illinois, Urbana-Champaign
25
TESLA S1070 (1)NVIDIA® Tesla™ S1070 運算系統 ( 雙 PCI Express 2.0 連結 ) 採用全球首 款 1 teraflop 處理器,是一台具備 4 teraflop
浮點運算能力的 1U 系統。
112/04/21Ch0027
112/04/21Ch0028
112/04/21Ch0029