Interactive computer graphics a top down approach with sharder based

778 1K 0
Interactive computer graphics a top down approach with sharder based

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

This page intentionally left blank INTERACTIVE COMPUTER GRAPHICS A TOP-DOWN APPROACH WITH SHADER-BASED OPENGL® 6th Edition This page intentionally left blank INTERACTIVE COMPUTER GRAPHICS A TOP-DOWN APPROACH WITH SHADER-BASED OPENGL® 6th Edition EDWARD ANGEL University of New Mexico • DAVE SHREINER ARM, Inc Editorial Director: Marcia Horton Editor-in-Chief: Michael Hirsch Acquisitions Editor: Matt Goldstein Editorial Assistant: Chelsea Bell Vice President, Marketing: Patrice Jones Marketing Manager: Yezan Alayan Marketing Coordinator: Kathryn Ferranti Vice President, Production: Vince O’Brien Managing Editor: Jeff Holcomb Senior Production Project Manager: Marilyn Lloyd Senior Operations Supervisor: Alan Fischer Operations Specialist: Lisa McDowell Text Designer: Beth Paquin Cover Designer: Central Covers Cover Art: Hue Walker, Fulldome Project, University of New Mexico Media Editor: Daniel Sandin Media Project Manager: Wanda Rockwell Full-Service Project Management: Coventry Composition Composition: Coventry Composition, using ZzTEX Printer/Binder: Edwards Brothers Cover and Insert Printer: Lehigh-Phoenix Color Text Font: Minion Credits and acknowledgments borrowed from other sources and reproduced, with permission, in this textbook appear on appropriate page within text Copyright © 2012, 2009, 2006, 2003, 2000 Pearson Education, Inc., publishing as AddisonWesley All rights reserved Manufactured in the United States of America This publication is protected by Copyright, and permission should be obtained from the publisher prior to any prohibited reproduction, storage in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or likewise To obtain permission(s) to use material from this work, please submit a written request to Pearson Education, Inc., Permissions Department, 501 Boylston Street, Suite 900, Boston, Massachusetts 02116 Many of the designations by manufacturers and sellers to distinguish their products are claimed as trademarks Where those designations appear in this book, and the publisher was aware of a trademark claim, the designations have been printed in initial caps or all caps Library of Congress Cataloging-in-Publication Data Angel, Edward Interactive computer graphics : a top-down approach with shader-based OpenGL / Edward Angel, David Shreiner — 6th ed p cm Includes bibliographical references and index ISBN-13: 978-0-13-254523-5 (alk paper) ISBN-10: 0-13-254523-3 (alk paper) Computer graphics OpenGL I Shreiner, Dave II Title T385.A5133 2012 006.6—dc22 2011004742 10 1—EB—15 14 13 12 11 Addison-Wesley is an imprint of ISBN 10: 0-13-254523-3 ISBN 13: 978-0-13-254523-5 To Rose Mary —E.A To Vicki, Bonnie, Bob, and Phantom —D.S This page intentionally left blank CONTE NTS Preface xxi CHAPTER GRAPHICS SYSTEMS AND MODELS 1.1 Applications of Computer Graphics 1.1.1 1.1.2 1.1.3 1.1.4 Display of Information Design Simulation and Animation User Interfaces 1.2 A Graphics System 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 Pixels and the Frame Buffer The CPU and the GPU Output Devices Input Devices Physical Input Devices 10 Logical Devices 12 Input Modes 13 1.3 Images: Physical and Synthetic 1.3.1 1.3.2 1.3.3 Objects and Viewers 15 Light and Images 16 Imaging Models 18 1.4 Imaging Systems 1.4.1 1.4.2 The Pinhole Camera 20 The Human Visual System 1.5 The Synthetic-Camera Model 23 1.6 The Programmer’s Interface 25 1.6.1 1.6.2 1.6.3 1.6.4 The Pen-Plotter Model 27 Three-Dimensional APIs 28 A Sequence of Images 31 The Modeling–Rendering Paradigm 1.7 Graphics Architectures 1.7.1 1.7.2 Display Processors 34 Pipeline Architectures 34 5 15 20 22 32 33 vii viii Contents 1.7.3 1.7.4 1.7.5 1.7.6 1.7.7 The Graphics Pipeline 35 Vertex Processing 36 Clipping and Primitive Assembly Rasterization 37 Fragment Processing 37 1.8 Programmable Pipelines 37 1.9 Performance Characteristics 38 Summary and Notes 39 Suggested Readings 40 Exercises CHAPTER 36 41 GRAPHICS PROGRAMMING 43 2.1 The Sierpinski Gasket 43 2.2 Programming Two-Dimensional Applications 46 50 2.3 The OpenGL Application Programming Interface 2.3.1 2.3.2 2.3.3 2.3.4 Graphics Functions 51 The Graphics Pipeline and State Machines The OpenGL Interface 53 Coordinate Systems 55 2.4 Primitives and Attributes 2.4.1 2.4.2 2.4.3 2.4.4 2.4.5 2.4.6 2.4.7 Polygon Basics 58 Polygons in OpenGL 59 Approximating a Sphere 60 Triangulation 62 Text 64 Curved Objects 65 Attributes 65 2.5 Color 2.5.1 2.5.2 2.5.3 RGB Color 69 Indexed Color 71 Setting of Color Attributes 2.6 Viewing 2.6.1 2.6.2 The Orthographic View 74 Two-Dimensional Viewing 77 2.7 Control Functions 2.7.1 2.7.2 2.7.3 2.7.4 Interaction with the Window System 78 Aspect Ratio and Viewports 79 The main, display, and init Functions 80 Program Structure 83 53 56 67 72 73 78 Color Plate Flat-shaded polygonal rendering of sun object (Courtesy of Fulldome Project, University of New Mexico.) Color Plate Smooth-shaded polygonal rendering of sun object (Courtesy of Fulldome Project, University of New Mexico.) Color Plate Wire-frame of NURBS representation of sun object showing the high number of polygons used in rendering the NURBS surfaces (Courtesy of Fulldome Project, University of New Mexico.) Color Plate Rendering of sun object showing bump map (Courtesy of Fulldome Project, University of New Mexico.) Color Plate Rendering of sun object with an environment map (Courtesy of Fulldome Project, University of New Mexico.) Color Plate Rendering of a small part of the sun object with an environment map (Courtesy of Fulldome Project, University of New Mexico.) (a) Without antialiasing (b) With antialiasing Color Plate Axonometric view from outside of temple (Courtesy of Richard Nordhaus, Architect, Albuquerque, NM.) Color Plate 10 Perspective view of interior of temple (Courtesy of Richard Nordhaus, Architect, Albuquerque, NM.) Color Plate 11 Cartoon-shaded teapot (Courtesy of Ed Angel, University of New Mexico.) Color Plate 12 Reflection map from a color cube on teapot (Courtesy of Ed Angel, University of New Mexico.) Color Plate 13 Interface for animation using Maya (Courtesy of Hue Walker, ARTS Lab, University of New Mexico.) Color Plate 14 (a) Wire-frame model of a wave (Courtesy of Sony Pictures Entertainment.) Color Plate 14 (b) White water and spray created by particle system (Courtesy of Sony Pictures Entertainment.) Color Plate 14 (c) Final composited image from “Surf’s Up.” (Courtesy of Sony Pictures Entertainment.) Color Plate 15 Rendering using ray tracer (Courtesy of Patrick McCormick.) Color Plate 16 Radiosity rendering showing soft shadows and diffuse–diffuse reflections (Courtesy of A Van Pernis, K Rasche, R Geist, Clemson University.) Color Plate 17 Array of Utah teapots with different material properties (Courtesy of SGI.) Color Plate 18 Phong-Blinn shaded teapots (Courtesy of Ed Angel, University of New Mexico.) (a) Using per-vertex lighting (b) Using per-fragment lighting (c) Area near highlight (d) Area near highlight Color Plate 19 Fluid dynamics of the mantle of the Earth Pseudocolor mapping of temperatures and isotemperature surface (Courtesy of James Painter, Los Alamos National Laboratory.) Color Plate 20 Volume rendering of CT data (Courtesy of J Kniss, G Kindlmann, C Hansen, Scientific Computing and Imaging Institute, University of Utah.) Color Plate 21 RGB color cube (Courtesy of University of New Mexico.) Color Plate 22 Avatar representing a patient who is being diagnosed and treated by a remotely located health professional (inset) (Courtesy of Tom Caudell, Visualization Laboratory, Albuquerque High Performance Computing Center, University of New Mexico.) Color Plate 23 One frame from Pixar’s “Geri’s Game” showing refraction through reflections on Geri’s glasses (Courtesy of Pixar Animation Studios.) Color Plate 24 Reflection map from environment computed from the center of the lens on Geri’s glasses The reflection map is then mapped to the glasses as part of the rendering process (Courtesy of Pixar Animation Studios.) Color Plate 25 Elevation data for Honolulu, Hawaii, displayed using a quadmesh to define control points for a Bezier surface (Courtesy of Brian Wylie, University of New Mexico and Sandia National Laboratories.) Color Plate 26 Wire frame of the quadmesh showing lower resolution in flat areas (Courtesy of Brian Wylie, University of New Mexico and Sandia National Laboratories.) Color Plate 27 Rendering of hierarchical robot figure (Courtesy of University of New Mexico.) Color Plate 28 Sphere computed by recursive subdivision of tetrahedrons; triangle colors assigned randomly (Courtesy of University of New Mexico.) Color Plate 29 Shadows from a cube onto ground Computed by two passes over the data with viewpoint shifted between viewer and light source (Courtesy of University of New Mexico.) Color Plate 30 Visualization of thermohaline flows in the Carribean Sea using streamtubes colored by water temperature (Courtesy of David Munich, High Performance Computing Center, University of New Mexico.) Color Plate 31 Particle system (Courtesy of Team One Advertising.) (a) Mesh of particles b) Model of Lexus with surface (c) Wind blowing mesh off Lexus (d) Mesh blown away from Lexus ... page intentionally left blank INTERACTIVE COMPUTER GRAPHICS A TOP- DOWN APPROACH WITH SHADER -BASED OPENGL® 6th Edition This page intentionally left blank INTERACTIVE COMPUTER GRAPHICS A TOP- DOWN. .. which was published in 1997, was somewhat revolutionary in using a standard graphics library and a top- down approach Over the succeeding 13 years and five editions, this approach has been adopted... also an OpenGL API called Mesa that is included with most Linux distributions A graphics class teaches far more than the use of a particular API, but a good API makes it easier to teach key graphics

Ngày đăng: 18/05/2017, 10:56

Từ khóa liên quan

Mục lục

  • Cover

  • Title Page

  • Copyright Page

  • Contents

  • Preface

  • Acknowledgments

  • CHAPTER 1 GRAPHICS SYSTEMS AND MODELS

    • 1.1 Applications of Computer Graphics

      • 1.1.1 Display of Information

      • 1.1.2 Design

      • 1.1.3 Simulation and Animation

      • 1.1.4 User Interfaces

      • 1.2 A Graphics System

        • 1.2.1 Pixels and the Frame Buffer

        • 1.2.2 The CPU and the GPU

        • 1.2.3 Output Devices

        • 1.2.4 Input Devices

        • 1.2.5 Physical Input Devices

        • 1.2.6 Logical Devices

        • 1.2.7 Input Modes

        • 1.3 Images: Physical and Synthetic

          • 1.3.1 Objects and Viewers

          • 1.3.2 Light and Images

          • 1.3.3 Imaging Models

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan