Computer Graphics. Apurva A. Desai

Similar documents
COMPUTER GRAPHICS, MULTIMEDIA AND ANIMATION, Second Edition (with CD-ROM) Malay K. Pakhira

OXFORD ENGINEERING COLLEGE (NAAC Accredited with B Grade) DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING LIST OF QUESTIONS

SRM INSTITUTE OF SCIENCE AND TECHNOLOGY

SRM ARTS AND SCIENCE COLLEGE SRM NAGAR, KATTANKULATHUR

Course Title: Computer Graphics Course no: CSC209

CHETTINAD COLLEGE OF ENGINEERING & TECHNOLOGY CS2401 COMPUTER GRAPHICS QUESTION BANK

CS2401 COMPUTER GRAPHICS ANNA UNIV QUESTION BANK


End-Term Examination

CHAPTER 1 Graphics Systems and Models 3

KRISTU JYOTI COLLEGE OF MANAGEMENT & TECHNOLOGY QUESTION BANK BCA SEMESTER III Computer graphics Part A (2 marks questions)

Course Title. Computer Graphics. Course Code CE313. Theory : 03. Practical : 01. Course Credit. Tutorial : 00. Credits : 04. Course Learning Outcomes

Roll No. : Invigilator's Signature :.. GRAPHICS AND MULTIMEDIA. Time Allotted : 3 Hours Full Marks : 70

COURSE DELIVERY PLAN - THEORY Page 1 of 6

KINGS GRAPHICS AND MULTIMEDIA DEPARTMENT OF COMPUTER SCIENCE AND ENGG. OUTPUT PRIMITIVES Part-A (2-MARKS)

Roll No. :... Invigilator's Signature : GRAPHICS AND MULTIMEDIA. Time Allotted : 3 Hours Full Marks : 70

Computer Graphics. Instructor: Oren Kapah. Office Hours: T.B.A.

QUESTION BANK 10CS65 : COMPUTER GRAPHICS AND VISUALIZATION

Graphics and Interaction Rendering pipeline & object modelling

Introduction to Computer Graphics

COURSE DELIVERY PLAN - THEORY Page 1 of 6

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Computer Graphics

Microcontrollers. Principles and Applications. Ajit Pal +5 V 2K 8. 8 bit dip switch. P2 8 Reset switch Microcontroller AT89S52 100E +5 V. 2.

SAZ4C COMPUTER GRAPHICS. Unit : 1-5. SAZ4C Computer Graphics

BHARATHIDASAN ENGINEERING COLLEGE,NATTRAMPALLI

Computer Graphics Solved MCQs -Part 2 MCQs Questions

Binghamton University. EngiNet. Thomas J. Watson. School of Engineering and Applied Science. State University of New York. EngiNet WARNING CS 560

VALLIAMMAI ENGINEERING COLLEGE

COURSE DELIVERY PLAN - THEORY Page 1 of 6

Interactive Computer Graphics A TOP-DOWN APPROACH WITH SHADER-BASED OPENGL

Lahore University of Management Sciences. CS 452 Computer Graphics

Institutionen för systemteknik

Object-Oriented Analysis and Design Using UML

COMP30019 Graphics and Interaction Rendering pipeline & object modelling

Lecture outline. COMP30019 Graphics and Interaction Rendering pipeline & object modelling. Introduction to modelling

Aptitude Test Question

Course: 601 : Computer Graphics

MICROPROCESSOR 8085 AND ITS INTERFACING SUNIL MATHUR. Second Edition A 1 ALE AD 0 - AD 7. Latch. Keyboard data V CC 8 P A D D 0 7 STB STB G G A

03 Vector Graphics. Multimedia Systems. 2D and 3D Graphics, Transformations

Chapter 1 Introduction

(a) rotating 45 0 about the origin and then translating in the direction of vector I by 4 units and (b) translating and then rotation.

DIGITA L LOGIC AND COMPUTER ORGA NIZATION

Points and lines, Line drawing algorithms. Circle generating algorithms, Midpoint circle Parallel version of these algorithms

Lahore University of Management Sciences. CS 452 Computer Graphics

U.C. Berkeley, EECS, Computer Science TAKE HOME EXAM. Your Class Computer Account: Your student ID #:

Analysis of Algorithms

U.C. Berkeley, EECS, Computer Science TAKE HOME EXAM. Your Class Computer Account: DO NOT OPEN THIS INSIDE SODA HALL -- WAIT UNTIL YOU ARE ALONE!

GLOBAL EDITION. Interactive Computer Graphics. A Top-Down Approach with WebGL SEVENTH EDITION. Edward Angel Dave Shreiner

Development of Computer Graphics

Einführung in Visual Computing

Module Contact: Dr Stephen Laycock, CMP Copyright of the University of East Anglia Version 1

Topics and things to know about them:

CS 130 Final. Fall 2015

Manipal Institute of Technology Manipal University Manipal

Introduction to Computer Graphics. Knowledge basic concepts 2D and 3D computer graphics

Telecommunication Switching Systems and Networks

Computer Graphics I Lecture 11

MICROPROCESSOR Architecture, Programming and Interfacing SUNIL MATHUR. Assistant Professor Maharaja Agrasen Institute of Technology Delhi

SRI VENKATESWARA COLLEGE OF ENGINEERING. COURSE DELIVERY PLAN - THEORY Page 1 of 6

Computer Graphics 1 Instructor Information. Books. Graphics? Course Goals and Outcomes. Where are computer graphics? Where are computer graphics?

Foundations of 3D Graphics Programming

Development of Computer Graphics. mid 1950s SAGE air defense system command & control CRT, light pens

Graphics Hardware and Display Devices

Computer Graphics Introduction. Taku Komura

Welcome to COMP 770 (236) Introduction. Prerequisites. Prerequisites

R asterisation. Part I: Simple Lines. Affine transformation. Transform Render. Rasterisation Line Rasterisation 2/16

1. Basic geometric transformation include. a. Translation. b. Rotation. c. Scaling. d. All of these. 2. Some additional transformation are. a.

The University of Calgary

CLOUD COMPUTING. M.N. Rao

Fundamentals of Discrete Mathematical Structures

Punjab Technical University Bachelor in Mobile Computing & Internet Batch 2014 onwards THIRD SEMESTER

Computer Graphics Lecture 2

Lesson Plan. Name of Faculty: Sana Bharti. Discipline: MCA. Semester: 4 th. Subject: Data Mining and Warehousing (MCA-16-43)

Overview. Computer Graphics CSE 167

Welcome to CS 4/57101 Computer Graphics

Today. CS-184: Computer Graphics. Lecture #10: Clipping and Hidden Surfaces. Clipping. Hidden Surface Removal

1 Attempt any three of the following: 1 5 a. What is Computer Graphics? How image is to be display on Video Display Device?

CS 464 Review. Review of Computer Graphics for Final Exam

Representing Graphical Data

Graphics Programming in c++

SRM UNIVERSITY FACULTY OF ENGINEERING AND TECHNOLOGY DEPARTMENT OF COMPUTER APPLICATIONS COURSE PLAN

Computer Graphics & Image Processing: Exercises

Lecturer Athanasios Nikolaidis

COURSE PLAN Regulation: R11 FACULTY DETAILS:

CS1354 GRAPHICS AND MULTIMEDIA DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING QUESTION BANK SUB CODE / SUBJECT: CS1354 GRAPHICS AND MULTIMEDIA.

Graphics Systems and Models

Image Formation. Introduction to Computer Graphics. Machiraju/Zhang/Möller/Klaffenböck

Computer Graphics: Programming, Problem Solving, and Visual Communication

A Programming Approach with C DHARMENDER SINGH KUSHWAHA

CS380: Computer Graphics Introduction. Sung-Eui Yoon ( 윤성의 ) Course URL:

THE AUSTRALIAN NATIONAL UNIVERSITY Final Examinations(Semester 2) COMP4610/COMP6461 (Computer Graphics) Final Exam

Syllabus CS476 COMPUTER GRAPHICS Fall 2009

Pipeline Operations. CS 4620 Lecture 14

ME COMPUTER AIDED DESIGN COMPUTER AIDED DESIGN 2 MARKS Q&A

FUNDAMENTALS OF DIGITAL CIRCUITS

AutoCAD DWG Drawing Limitations in SAP 3D Visual Enterprise 9.0 FP03

Pipeline Operations. CS 4620 Lecture 10

Computer Graphics & Image Processing: Exercises

Computer Graphics. Bing-Yu Chen National Taiwan University

0. Introduction: What is Computer Graphics? 1. Basics of scan conversion (line drawing) 2. Representing 2D curves

Transcription:

Computer Graphics Apurva A. Desai

COMPUTER GRAPHICS Apurva A. Desai Professor and Head Department of Computer Science Veer Narmad South Gujarat University Surat New Delhi-110001 2008

COMPUTER GRAPHICS Apurva A. Desai 2008 by PHI Learning Private Limited, New Delhi. All rights reserved. No part of this book may be reproduced in any form, by mimeograph or any other means, without permission in writing from the publisher. ISBN-978-81-203-3524-0 The export rights of this book are vested solely with the publisher. Published by Asoke K. Ghosh, PHI Learning Private Limited, M-97, Connaught Circus, New Delhi-110001 and Printed by Rajkamal Electric Press, B-35/9, G.T. Karnal Road Industrial Area, Delhi-110033.

Dedicated to Sources of my Inspiration and my Strengths My Loving Father Late Shri Arunbhai My Caring Mother Smt. Kokilaben My Loving and Caring Wife Sejal My Charming and Sparkling Son Smit And of course my Parents-in-Law Shri Navinbhai and Smt. Ranjanben

CONTENTS Foreword...ix Preface...xi Acknowledgements... xv 1. Overview of Computer Graphics... 1 30 1.1 Historical Background of Computer Graphics 2 1.2 Applications of Computer Graphics 4 1.2.1 Entertainment 4 1.2.2 Advertisement 4 1.2.3 Simulation Modelling 5 1.2.4 Architecture 5 1.2.5 Information Visualization and Processing 6 1.2.6 Virtual Reality 6 1.2.7 Image Processing 7 1.2.8 Miscellaneous 7 1.3 Some Popular Graphics Softwares 8 1.4 Pixel Graphics vs. Vector Graphics 9 1.5 Hard Copy Graphics Devices 10 1.5.1 Dot Matrix Printers 10 1.5.2 Inkjet Printer 11 1.5.3 Laser Printer 13 1.5.4 Plotters 14 1.6 Computer Display Devices 15 1.6.1 Early Days of Imaging Technology 16 1.6.2 Cathode Ray Tube (CRT) 17 1.6.3 Liquid Crystal Display (LCD) 19 1.7 Input Devices 20 1.7.1 Text Input Devices 20 1.7.2 Pointing Devices 21 1.7.3 Image and Video Input Devices 24 Summary 26 Exercises 27 Suggested Readings and Bibliography 27 2. Mathematical Foundation for Computer Graphics... 31 70 2.1 Basic Geometry 31 2.1.1 Straight Line and Line Segment 32 2.1.2 Circle 39 2.1.3 Ellipse 41 2.1.4 Conic Sections 43 2.2 3-Dimensional Geometry 46 2.3 Trigonometry 49 v

vi Contents 2.4 Matrix Algebra 52 2.4.1 Some Special Types of Matrices 53 2.4.2 Matrix Operations 55 Summary 67 Exercises 67 Suggested Readings and Bibliography 69 3. Graphics Primitives... 71 104 3.1 Line Drawing Algorithms 72 3.1.1 VECGEN Algorithm 73 3.1.2 Brasenham Line Drawing Algorithm 75 3.2 Circle Generating Algorithms 81 3.2.1 Parametric Circle Drawing Algorithm 82 3.2.2 Brasenham Circle Drawing Algorithm 83 3.3 Different Line Styles 86 3.3.1 Thick Line 87 3.3.2 Line Caps 89 3.3.3 Thick Line Joints 90 3.3.4 Pens and Brushes 91 3.4 Curves 91 3.4.1 DDA Approach for Drawing a Circular Arc 92 3.5 Text and Character Attributes 94 3.6 Anti-aliasing 97 Summary 99 Exercises 100 Programming Problems 100 Suggested Readings and Bibliography 102 4. Polygons... 105 140 4.1 Polygon 105 4.2 Polygon Inside Tests 109 4.2.1 Even Odd Method 109 4.2.2 Winding Number Method 114 4.2.3 Some Other Methods for Performing Inside Test 118 4.3 Polygon Area Filling 120 4.3.1 Flood Fill Method 120 4.3.2 Scan-line Fill Method 123 4.3.3 Boundary Fill 131 4.3.4 Filling Polygon with Patterns 134 Summary 136 Review Questions 136 Programming Problems 137 Suggested Readings and Bibliography 139 5. Geometric Transformations... 141 172 5.1 Basic Transformation 141 5.1.1 Scaling 142 5.1.2 Translation 144 5.1.3 Rotation 145 5.2 Homogeneous Coordinates 148 5.3 Rotation Relative to an Arbitrary Point 152 5.4 Some Other Transformations 155 5.4.1 Reflection 155 5.4.2 Shearing 161

Contents vii 5.5 Coordinate Transformation 165 5.6 Inverse Transformation 166 5.7 Affine Transformation 166 5.8 Raster Transformation 166 5.9 Transforming Polygon with Pattern 168 Summary 170 Exercises 170 Programming Problems 171 Suggested Readings and Bibliography 171 6. Viewing in Two Dimensions... 173 209 6.1 Window and Viewport 173 6.2 Viewing Transformation 175 6.3 Clipping 179 6.3.1 Point Clipping 180 6.3.2 Line Clipping 181 6.4 Polygon Clipping 200 6.4.1 Sutherland Hodgman Polygon Clipping Algorithm 200 6.5 Text Clipping 203 6.6 Interior and Exterior Clipping 205 6.7 Multiple Windowing 205 6.8 Generalized Clipping 206 Summary 207 Exercises 207 Programming Problems 208 Suggested Readings and Bibliography 208 7. Graphics in Three Dimensions... 210 248 7.1 Displays in Three Dimensions 210 7.2 3-D Transformation 212 7.3 Rotation of a 3-Dimensional Object 214 7.3.1 Rotation Transformation about an Arbitrary Axis 217 7.4 3-Dimensional Viewing 225 7.4.1 Viewing Parameters 225 7.4.2 Projection 228 7.4.3 Perspective Projection 234 7.4.4 Types of Perspective Projections 237 7.5 Clipping in Three Dimensions 240 Summary 243 Exercises 243 Programming Problems 244 Further Readings and Bibliography 245 8. Hidden Surfaces... 249 267 8.1 Back Face Removal Algorithm 250 8.2 Z-Buffer Method 253 8.3 A-Buffer Algorithm 255 8.4 Scan-line Algorithm 256 8.5 Painter s Algorithm 256 8.6 Warnock s Algorithm 259 8.7 Binary Space Partition (BSP) Method 261 8.8 Ray Casting Algorithm 265

viii Contents Summary 265 Exercises 265 Programming Problems 266 Further Readings and Bibliography 266 9. Colours and Shading... 268 292 9.1 Light Sources 268 9.2 Illumination 270 9.3 Shading 272 9.3.1 Constant Shading 273 9.3.2 Gouraud Shading 274 9.3.3 Phong Shading 274 9.4 Transparency 275 9.5 Shadow 277 9.6 Colours 279 9.6.1 RGB Colour Model 281 9.6.2 CMY Colour Model 284 9.6.3 HSV Colour Model 285 Summary 288 Exercises 288 Programming Problems 289 Further Readings and Bibliography 289 10. Graphics Standards... 293 311 10.1 Graphics Kernel System (GKS) 294 10.2 PHIGS 297 10.3 OpenGL 299 10.4 Graphics File Formats 301 10.4.1 Bitmap File Format 302 10.4.2 JPEG 305 10.4.3 GIF 306 Summary 309 Exercises 309 Programming Problems 310 Further Readings and Bibliography 310 11. Introduction to Advanced Graphics Techniques... 312 340 11.1 Computer Animation 312 11.2 Morphing 316 11.3 Digital Image Processing 318 11.3.1 Image Restoration and Enhancement Methods 318 11.4 Fractals 322 11.4.1 Hilbert s Curve 323 11.4.2 Koch Snowflake Curve 324 11.4.3 Fractal Surface 326 11.5 Ray Tracing 330 Summary 333 Exercises 333 Further Readings and Bibliography 334 Index... 341 347

FOREWORD In the current Information age, knowledge of fundamental graphics and suitable programming methodologies plays a crucial role in designing and developing high quality software. Market is teeming with books, manuals, aids, etc. authored by both foreign and Indian experts. However, due to continuous changes taking place in the field of computer science, people keep looking for new developments for improving the quality of teaching and learning methodologies. For the past one decade or more, Computer Graphics is being viewed as the heart and soul of visual programming because of its applications to several areas such as entertainment, advertising, education, training, multimedia, etc. We, being in the computer education, are always on the lookout for a book that caters to the needs of the Indian students for learning the subject right from fundamentals to the latest developments in professional graphics. Computer Graphics by Professor Apurva A. Desai has come at an appropriate time to meet the present demand. The book in itself is very well designed, content-wise as well as presentation-wise, and includes a range of aspects of computer graphics, which need attention. Touching upon the historical and progressing to most modern aspects, this text on computer graphics is a good guide for the students as well as the instructors. The book covers all the essential and conceivable aspects of computer graphics. It amply illustrates Prof. Desai s in-depth understanding of the subject and speaks well of his vast experience in teaching and research in computer applications. The target groups would be the students of B.E./B.Tech., M.E./M.Tech., and the M.Sc. students pursuing courses in the disciplines of Computer Science and Information Technology, as well as the students of BCA and MCA courses. ix

Computer Graphics 25% OFF Publisher : PHI Learning ISBN : 978812033524 0 Author : DESAI, APURVA A. Type the URL : http://www.kopykitab.com/product/7375 Get this ebook