Authorized Translation from the English language edition, entitled INTERACTIVE COMPUTER GRAPHICS: A TOP-DOWN APPROACH USING OPENGL, 5th Edition by ANGEL, EDWARD, published by Pearson Education, Inc, publishing as Addison- Wesley, Copyright 2009 All rights reserved. No part of this book may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording or by any information storage retrieval system, without permission from Pearson Education, Inc. KOREAN language edition published by PEARSON EDUCATION KOREA LTD and SCITECH MEDIA, INC., Copyright 2009 2009 Interactive Computer Graphics, 5th edition Pearson Education Korea.
Interactive Computer Graphics. 1997 7. 8.,..... 3.. 3. OpenGL...,,.. 3.. John Kemeny... iii
Interactive Computer Graphics,,,..... 20, API(Application Programmer's Library).,,,. OpenGL API (GKS PHIGS). OpenGL 3. Microsoft Windows Apple Macintosh Operating System. Mesa OpenGL API. API API 3,,,. OpenGL API (compositing). 12 OpenGL. 3 3. 15.. OpenGL. OpenGL API. API OpenGL. C++ C.., OpenGL OpenGL C++ Java iv
PREFACE.., ( ),.. C++. OpenGL OpenGL DirectX. OpenGL API. DirectX. Windows. OpenGL DirectX. DirectX. 1,.. C C++ (, ),.,,.. B C.. 1, 3. 2 OpenGL. 2 v
Interactive Computer Graphics. 3 3. 3 -. 4 5 3, 4 3 5. 6 -. 15 10... 7.,,. 8 OpenGL... 9 OpenGL OpenGL Shading Language(GLSL).. 8 9. 10.. API. 11. 12.,. A. ( ). B C. D OpenGL. 3 OpenGL..... OpenGL. vi
PREFACE 9 OpenGL 2.0 OpenGL Shading Language... 3.. 3.., 2 2 3.. www.cs.unm.edu/~angel Addison- Wesley www.aw.com/cssuport.. OpenGL OpenGL PowerPoint. Addison-Wesley. UNM. OpenGL. Hue Bumgarner-Kirby (Walker), Ye Cong, Pat Crossno, Tommie Daniel, Chris Davis, Lisa Desjarlais, Kim Edlund, Lee Ann Fisk, Maria Gallegos, Brian Jones, Christopher Jordan, Max Hazelrigg, Sheryl Hurley, Thomas Keller, Ge Li, Pat McCormick, Al McPherson, Ken Moreland, Martin Muller, David Munich, Jim Pinkerton, Jim vii
Interactive Computer Graphics Prewett, Dave Rogers, Hal Smyer, Takeshi Hakamata, Dave Vick, Brian Wylie, Jin Xiong... 5..,. Universidad de los Andes (Venezuela) Jonas Montilva Chris Birkbeck, Universidad Tecnologica Equinoccial (Ecuador) Rodrigo Gallegos Aristides Novoa, National Tsing Hua University (Taiwan) Long Wen Chang, Chinese University of Hong Kong Kin Hong Wong Pheng Ann Heng. ISTEC Ramiro Jordan the University of New Mexico. University of New Mexico John Brayer, Jason Stewart Addison-Wesley Helen Goldstein.. New Mexico.. NVIDIA David Kirk Mark Kilgard.. Ben Bederson, Gonzalo Cartagenova, Tom Caudell, Kathi Collins, Kathleen Danielson, Roger Ehrich, Robert Geist, Chuck Hansen, Mark Henne, Bernard Moret, Dick Nordhaus, Helena Saona, Dave Shreiner, Vicki Shreiner, Gwen Sylvan, Mason Woo. Mark Kilgard, Brian Paul, Nate Robinson OpenGL OpenGL. University of New Mexico, High Performance Computing Center IBM. Computer Science Department, College of Fine Preface xxix Arts Arts Technology Center the National Science Foundation, Sandia National Laboratories, Los Alamos National Laboratory. David Beining Lodestar Planetarium Full Dome Project (Sheryl Hurley, Christopher Jordan, Laurel Ladwig, Hue (Bumgarner-Kirby) Walker).,. Gur Saran Adhar (University of North Carolina at viii
PREFACE Wilmington), Mario Agrular (Jacksonville State University), Michael Anderson (University of Hartford), C. S. Bauer (University of Central Florida), Marty Barrett (East Tennessee State University), Robert P. Burton (Brigham Young University), Sam Buss (University of California, San Diego), Kai H. Chang (Auburn University), Ron DiNapoli (Cornell University), Eric Alan Durant (Milwaukee School of Engineering), David S. Ebert (Purdue University), Chenyi Hu (University of Central Arkansas), Mark Kilgard (NVIDIA Corporation), Lisa B. Lancor (Southern Connecticut State University), Chung Lee (CA Polytechnic University, Pomona), John L. Lowther (Michigan Technological University), R. Marshall (Boston University and Bridgewater State College), Bruce A. Maxwell (Swathmore College), James R. Miller (University of Kansas), Han-Wei Shen (The Ohio State University), Oliver Staadt (University of California, Davis), Stephen L. Stepoway (Southern Methodist University), MichaelWainer (Southern Illinois University, Carbondale), George Wolberg (City College of New York), YangWang (Southern Methodist State University), SteveWarren (Kansas State University), MikeWay (Florida Southern College), Ying Zhu (Georgia State University). - -. Addison-Wesley. Peter Gordon, Maite Suarez-Rivas, Matt Goldstein 4 OpenGL Primer. Katherine Harutunian Addison-Wesley. Windfall Software Paul Anagnostopoulos TEXT. Lyn Dupre.. Lyn. Rose Mary Molnar.. Rose Mary. ix
Interactive Computer Graphics,,.,....,.. Angel OpenGL. OpenGL, OpenGL. 5..,.., 12 CD. ( ).. 2009 2 x
Interactive Computer Graphics (KAIST) Imperial College Queen Mary College ( ) University of Tsukuba( ) ( ) xi
Interactive Computer Graphics Chapter 01 1.1 1.1.1 1.1.2 1.1.3 1.1.4 1.2 1.2.1 1.2.2 1.2.3 1.3 1.3.1 1.3.2 1.3.3 1.4 1.4.1 1.4.2 1.5 1.6 1.6.1 1.6.2 1.6.3 1.6.4 1.7 1.7.1 1.7.2 1.7.3 1.7.4 1.7.5 1.7.6 1.8 1.9 xii
CONTENTS Chapter 02 2.1 2.2 2.2.1 2.3 2.3.1 2.3.2 2.3.3 2.4 2.4.1 2.4.2 2.4.3 2.4.4 2.4.5 2.4.6 2.5 2.5.1 2.5.2 2.5.3 2.6 2.6.1 2.6.2 2.6.3 2.7 2.7.1 2.7.2 2.7.3 2.7.4 2.8 2.9 2.10 2.10.1 2.10.2 2.10.3 2.11 2.11.1 xiii
Interactive Computer Graphics Chapter 03 3.1 3.2 3.2.1 3.2.2 3.2.3 3.3 3.4 3.4.1 3.4.2 3.4.3 3.5 3.6 3.6.1 3.6.2 3.6.3 3.6.4 3.6.5 3.7 3.8 3.9 3.10 3.11 3.11.1 3.11.2 3.11.3 3.12 3.12.1 3.13 3.13.1 3.13.2 3.13.3 xiv
CONTENTS Chapter 04 4.1 4.1.1 4.1.2 4.1.3 4.1.4 4.1.5 4.1.6 4.1.7 4.1.8 4.1.9 4.2 4.3 4.3.1 4.3.2 4.3.3 4.3.4 4.3.5 4.3.6 4.4 4.5 4.5.1 4.5.2 4.5.3 4.5.4 4.5.5 4.5.6 4.6 4.7 4.7.1 4.7.2 4.7.3 4.8 4.8.1 4.8.2 4.8.3 4.8.4 4.9 4.9.1 4.9.2 4.9.3 4.9.4 4.10 4.10.1 4.10.2 4.10.3 4.10.4 4.10.5 4.10.6 4.11 4.11.1 4.11.2 4.11.3 4.12 4.12.1 xv
Interactive Computer Graphics Chapter 05 5.1 5.1.1 5.1.2 5.1.3 5.1.4 5.1.5 5.2 5.3 5.3.1 5.3.2 5.3.3 5.3.4 5.4 5.4.1 5.5 5.5.1 5.5.2 5.6 5.6.1 5.7 5.7.1 5.7.2 5.7.3 5.8 5.8.1 5.8.2 5.8.3 5.9 5.9.1 5.9.2 5.10 Chapter 06 6.1 6.2 6.2.1 6.2.2 6.2.3 6.2.4 6.2.5 xvi
CONTENTS 6.3 6.3.1 6.3.2 6.3.3 6.3.4 6.4 6.4.1 6.4.2 6.5 6.5.1 6.5.2 6.5.3 6.6 6.7 6.8 6.9 6.10 Chapter 07 7.1 7.2 7.2.1 7.2.2 7.2.3 7.2.4 7.3 7.4 7.4.1 7.4.2 7.5 7.6 7.6.1 7.6.2 7.6.3 7.7 xvii
Interactive Computer Graphics 7.8 7.9 7.10 7.10.1 7.10.2 7.10.3 7.10.4 7.10.5 7.11 7.11.1 7.11.2 7.11.3 7.11.4 7.11.5 7.11.6 7.11.7 7.12 7.13 7.13.1 7.13.2 7.13.3 7.13.4 Chapter 08 8.1 8.2 8.3 8.3.1 8.3.2 8.4 8.4.1 8.4.2 8.4.3 8.4.4 8.4.5 8.5 8.5.1 8.5.2 8.5.3 8.6 8.7 8.7.1 xviii
CONTENTS 8.8 8.8.1 8.8.2 8.8.3 8.8.4 8.8.5 8.9 8.10 8.11 8.11.1 8.11.2 8.11.3 8.11.4 8.11.5 8.11.6 8.12 8.12.1 8.12.2 8.12.3 8.12.4 8.12.5 8.13 8.13.1 8.13.2 8.13.3 Chapter 09 9.1 9.2 9.2.1 9.3 9.3.1 9.3.2 9.4 9.4.1 9.4.2 9.5 9.5.1 9.5.2 9.5.3 9.6 xix
Interactive Computer Graphics 9.7 9.7.1 9.7.2 9.7.3 9.8 9.8.1 9.8.2 9.9 9.10 9.11 9.12 9.12.1 9.12.2 9.12.3 9.13 9.13.1 9.13.2 Chapter 10 10.1 10.2 10.3 10.4 10.4.1 10.5 10.6 10.7 10.7.1 10.7.2 10.7.3 10.7.4 10.7.5 10.8 10.9 10.9.1 10.9.2 10.9.3 xx
CONTENTS 10.9.4 10.9.5 10.9.6 10.9.7 10.9.8 10.10 10.11 10.11.1 10.11.2 10.11.3 10.11.4 10.12 10.12.1 10.12.2 10.12.3 Chapter 11 11.1 11.2 11.3 11.3.1 11.3.2 11.3.3 11.4 11.5 11.5.1 11.5.2 11.6 11.6.1 11.6.2 11.6.3 11.6.4 11.6.5 11.6.6 11.7 11.8 11.8.1 11.8.2 11.8.3 11.8.4 11.8.5 xxi
Interactive Computer Graphics 11.9 Chapter 12 12.1 12.1.1 12.1.2 12.1.3 12.1.4 12.1.5 12.2 12.3 12.4 12.4.1 12.4.2 12.5 12.5.1 12.5.2 12.6 12.6.1 12.6.2 12.7 12.7.1 12.7.2 12.7.3 12.8 12.8.1 12.8.2 12.8.3 12.8.4 12.8.5 12.9 12.9.1 12.9.2 12.9.3 12.9.4 12.10 12.11 12.11.1 12.11.2 xxii
CONTENTS 12.11.3 12.11.4 12.12 12.12.1 12.12.2 12.12.3 12.12.4 12.12.5 Chapter 13 13.1 13.2 13.3 13.3.1 13.3.2 13.3.3 13.4 13.5 13.5.1 13.5.2 13.5.3 13.5.4 13.6 13.7 13.7.1 13.7.2 13.7.3 13.8 13.8.1 Appendix A A.1 A.2 xxiii
Interactive Computer Graphics A.3 A.4 A.5 A.6 A.7 A.8 A.9 A.10 A.11 A.12 A.13 A.14 A.15 A.16 A.17 A.18 A.19 Appendix B B.1 B.2 B.3 B.4 B.5 B.6 Appendix C C.1 xxiv
CONTENTS C.2 C.3 C.4 C.5 C.6 C.7 Appendix D D.1 D.2 D.3 D.4 D.5 D.7 D.8 D.9 D.10 D.11 D.12 D.13 D.14 D.15 D.16 D.17 D.18 D.19 Chapter 12 Appendix D xxv