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

Similar documents
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY

SRM ARTS AND SCIENCE COLLEGE SRM NAGAR, KATTANKULATHUR

CS2401 COMPUTER GRAPHICS ANNA UNIV QUESTION BANK

CHAPTER 1 Graphics Systems and Models 3

Aptitude Test Question

Chapter 5. Projections and Rendering

Course Title: Computer Graphics Course no: CSC209

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

3D Polygon Rendering. Many applications use rendering of 3D polygons with direct illumination

CHETTINAD COLLEGE OF ENGINEERING & TECHNOLOGY CS2401 COMPUTER GRAPHICS QUESTION BANK


MET71 COMPUTER AIDED DESIGN

CS184 : Foundations of Computer Graphics Professor David Forsyth Final Examination

VISIBILITY & CULLING. Don t draw what you can t see. Thomas Larsson, Afshin Ameri DVA338, Spring 2018, MDH

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

Computer Graphics. Bing-Yu Chen National Taiwan University The University of Tokyo

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

CS184 : Foundations of Computer Graphics Professor David Forsyth Final Examination (Total: 100 marks)

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

Chapter 1 Introduction

Graphics Systems and Models

Graphics Hardware and Display Devices

Computer Graphics. Bing-Yu Chen National Taiwan University

(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.

CEng 477 Introduction to Computer Graphics Fall 2007

Computer Science 426 Midterm 3/11/04, 1:30PM-2:50PM

FROM VERTICES TO FRAGMENTS. Lecture 5 Comp3080 Computer Graphics HKBU

Einführung in Visual Computing

QUESTION BANK 10CS65 : COMPUTER GRAPHICS AND VISUALIZATION

Overview. Pipeline implementation I. Overview. Required Tasks. Preliminaries Clipping. Hidden Surface removal

Computer Graphics. Chapter 1 (Related to Introduction to Computer Graphics Using Java 2D and 3D)

Introduction to Computer Graphics

End-Term Examination

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

Computer Graphics Solved MCQs -Part 2 MCQs Questions

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

Clipping & Culling. Lecture 11 Spring Trivial Rejection Outcode Clipping Plane-at-a-time Clipping Backface Culling

Rendering. Converting a 3D scene to a 2D image. Camera. Light. Rendering. View Plane

Graphics and Interaction Rendering pipeline & object modelling

Pipeline Operations. CS 4620 Lecture Steve Marschner. Cornell CS4620 Spring 2018 Lecture 11

CS602 Midterm Subjective Solved with Reference By WELL WISHER (Aqua Leo)

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

Computer Graphics. The Two-Dimensional Viewing. Somsak Walairacht, Computer Engineering, KMITL

Computer Graphics I Lecture 11

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

Pipeline Operations. CS 4620 Lecture 10

CS452/552; EE465/505. Clipping & Scan Conversion

Visibility and Occlusion Culling

Pipeline Operations. CS 4620 Lecture 14

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

COURSE DELIVERY PLAN - THEORY Page 1 of 6

Hidden surface removal. Computer Graphics

Game Architecture. 2/19/16: Rasterization

L1 - Introduction. Contents. Introduction of CAD/CAM system Components of CAD/CAM systems Basic concepts of graphics programming

Computer Graphics. Apurva A. Desai

Models and Architectures

Sir Sadiq s computer notes for class IX. Chapter no 3. Input/Output Devices

Introduction to Computer Graphics

9. Three Dimensional Object Representations

COMP30019 Graphics and Interaction Scan Converting Polygons and Lines

Notes on Assignment. Notes on Assignment. Notes on Assignment. Notes on Assignment

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

CMP 477 Computer Graphics Module 2: Graphics Systems Output and Input Devices. Dr. S.A. Arekete Redeemer s University, Ede

4.5 VISIBLE SURFACE DETECTION METHODES

9. Visible-Surface Detection Methods

Part 3: 2D Transformation

Motivation. Culling Don t draw what you can t see! What can t we see? Low-level Culling

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!

Surface Graphics. 200 polys 1,000 polys 15,000 polys. an empty foot. - a mesh of spline patches:

CSE528 Computer Graphics: Theory, Algorithms, and Applications

Hidden Surface Removal

Cs602-computer graphics MCQS MIDTERM EXAMINATION SOLVED BY ~ LIBRIANSMINE ~

CS 381 Computer Graphics, Fall 2008 Midterm Exam Solutions. The Midterm Exam was given in class on Thursday, October 23, 2008.

Computer Graphics Lecture 2

RASTERISED RENDERING

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

S U N G - E U I YO O N, K A I S T R E N D E R I N G F R E E LY A VA I L A B L E O N T H E I N T E R N E T

Three Main Themes of Computer Graphics

CSE528 Computer Graphics: Theory, Algorithms, and Applications

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

Computer Graphics Fundamentals. Jon Macey

Models and Architectures. Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico

CSE 167: Lecture #5: Rasterization. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012

Orthogonal Projection Matrices. Angel and Shreiner: Interactive Computer Graphics 7E Addison-Wesley 2015

CS 130 Final. Fall 2015

Spatial Data Structures and Speed-Up Techniques. Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology

CSE 690: GPGPU. Lecture 2: Understanding the Fabric - Intro to Graphics. Klaus Mueller Stony Brook University Computer Science Department

From 3D World to 2D Screen. Hendrik Speleers

Multimedia Technology CHAPTER 4. Video and Animation

CS602 MCQ,s for midterm paper with reference solved by Shahid

Lecture 4. Viewing, Projection and Viewport Transformations

Computer graphics 2 Marks 1. Define Computer graphics.

CSE328 Fundamentals of Computer Graphics: Concepts, Theory, Algorithms, and Applications

TDA362/DIT223 Computer Graphics EXAM (Same exam for both CTH- and GU students)

The Traditional Graphics Pipeline

Renderer Implementation: Basics and Clipping. Overview. Preliminaries. David Carr Virtual Environments, Fundamentals Spring 2005

3D graphics, raster and colors CS312 Fall 2010

3D Graphics Pipeline II Clipping. Instructor Stephen J. Guy

Three-Dimensional Viewing Hearn & Baker Chapter 7

Introduction to Computer Graphics with WebGL

Transcription:

SAZ4C COMPUTER GRAPHICS Unit : 1-5 1

UNIT :1 SYLLABUS Introduction to computer Graphics Video display devices Raster scan Systems Random Scan Systems Interactive input devices Hard copy devices Graphics software Output primitives line drawing algorithms initializing lines line function circle Generating algorithms. 2

Introduction to Computer Graphics Creation, Manipulation, and Storage of geometric objects (modeling) and their images (rendering) Display those images on screens or hardcopy devices Image processing Others: GUI, Haptics, Displays (VR)... 3

Computer Graphics The study of computer graphics is a sub-field of computer science which studies methods for digitally synthesizing and manipulating visual content. dimensional Although computer the graphics, term it often also refers to encompasses three- two- dimensional graphics and image processing. 4

Applications of Computer Graphics 5

Video Display Devices Cathode Ray Tube Raster Scan Display Random Scan Display Color CRT Monitor Flat Panel Display Plasma Panel Display Liquid Crystal Display 3D Viewing Device 6

Interactive Input Devices Keyboard Mouse Trackball& Space ball Joysticks Data Glove Digitizer Image Scanner Touch Panel Light Pen Voice System 7

Hard Copy Devices Laser Printer Inkjet Plotter Dot Matrix Printer Electrostatic Printer Pen Plotter Rollfeed Pen Plotter 8

Graphics Software Coordinate Representation Graphics Functions Software Standards PHIGS Workstations 9

Output Primitives Points and Lines Line Drawing Algorithms DDA Algorithm Bresenham s Line Algorithm Parallel Line Algorithm Loading the Frame Buffer Line Function 10

Line Drawing Algorithms A line drawing algorithm is a graphical algorithm for approximating a line segment on discrete graphical media. On discrete media, such as pixel-based displays and printers, line drawing requires such an approximation (in nontrivial cases). Basic algorithms rasterize lines in one color. 11

Line Function Two Dimensional Line Function: Polyline(n,wcPoints) 12

Circle Generating Algorithms Standard Algorithm Polar Algorithm Symmetry Algorithm Mid-Point Algorithm 13

Eclipse Generating Algorithms 14

UNIT 2: SYLLABUS Attributes of Output Primitives Line Attributes Color and Grayscale Style Area Filling Algorithms Character Attributes Inquiry Functions Two Dimensional Transformation Basic Transformation Composite Transformation Matrix Representation Other Transformations 15

Attributes of Output Primitives 1. The line-type attribute include solid lines, dashed lines, and dotted lines. 2. We modify a line drawing algorithm to generate such lines by setting the length and spacing of displayed solid sections along the line path. 3. Attributes: 1. Line Attributes 2. Color Attribute 3. Color and Gray Scale Level 4. Area Filled Attribute 5. Text and Characters 16

Line Attributes The line and curve attributes include the current position, brush style, brush color, pen style, pen color, transformation, and so on. Basic attributes of a straight line segment are its type, its width, and its color. In some graphics packages, lines can also be displayed using selected pen or brush options. Line-type attribute: solid lines, dashed lines, and dotted lines. 17

Color and Grayscale Style 1. Grayscale images are distinct from one-bit bi-tonal black-andwhite images, which in the context of computer imaging are images with only two colors, black and white (also called bilevel or binary images). Grayscale images have many shades of gray in between. 2. A grayscale or greyscale image is one in which the value of each pixel is a single sample representing only an amount of light, that is, it carries only intensity information. 3. The color scale is a specialized label object that displays a color map and its numerical scale for color mapped or contour data plots. The color scale displays by default when creating color-filled or gray-scale contour graphs. 18

Area Filling Algorithms It determines the area connected to a given cell in a multidimensional array. Following are some famous implementations of flood fill algorithm: Bucket Fill Solving a Maze Minesweeper Fill Styles Pattern Fill Soft Fill 19

Character Attributes Text Attributes settextfont(tf) settextcolourindex(tc) setcharacterheight(ch) setcharacterexpansionfactor(cw) setcharacterspacing(cs) setcharactervector(upvect) settextpath(tp) settextalignment(h,v) settextprecision(tpr) 20

Character Attributes Marker Attributes setmarkertype(mt) setmarkersizescalefactor(ms) setpolymarkercolourindex(mc) 21

Inquiry Functions These functions allow current values to be copied into specified parameters, which can then be saved for later reuse or used to check the current state of the system if an error occurs Example: inquirepolylineindex(lastli) inquireinteriorcolourindex(lastfc) Sample Coding: inquirelinetyoe(oldlt) setlinrtyoe(newlt).. setlinetype(oldlt) 22

Two Dimensional Transformation Transformation means changing some graphics into something else by applying rules. We can have various types of transformations such as translation, scaling up or down, rotation, shearing, etc. When a transformation takes place on a 2D plane, it is called 2D transformation. Transformations play an important role in computer graphics to reposition the graphics on the screen and change their size or orientation. 23

Basic Transformation Translation: A translation moves an object to a different position on the screen. You can translate a point in 2D by adding translation coordinate (tx, ty) to the original coordinate (X, Y) to get the new coordinate (X, Y ). Rotation In rotation, we rotate the object at particular angle θ (theta) from its origin. From the following figure, we can see that the point P(X, Y) is located at angle φ from the horizontal X coordinate with distance r from the origin. Scaling To change the size of an object, scaling transformation is used. In the scaling process, you either expand or compress the dimensions of the object. Scaling can be achieved by multiplying the original coordinates of the object with the scaling factor to get the desired result. 24

Composite Transformation A composite transformation (or composition of transformations) is two or more transformations performed one after the other. Sometimes, a composition of transformations is equivalent to a single transformation. 25

Matrix Representation The fact that the matrix of a composite transformation can be formed by multiplying the individual transformation matrices means that any sequence of affine transformations can be stored in a single Matrix object. 26

Other Transformations 1. 2. 3. 4. 5. 6. Translation Rotation Scaling General Pivot Point Rotation General Fixed Point Scaling General Scaling Directions 27

Unit III Syllabus Two - dimensional viewing Window- to view port co-ordinate transformation Clipping algorithms Interactive input methods Physical input devices Logical classification of input devices Interactive picture construction methods. 28

Two - Dimensional Viewing 29

Window To view port co-ordinate transformation A world coordinate area selected for display is called a window An area on a display device to which a window is mapped is called a viewport Mapping of a part of a world coordinate scene to device coordinates is referred to as a viewing transformation 30

Clipping Algorithms Any procedure that identifies those portions of a picture that are either inside or outside of a specified region of space is referred to as a clipping algorithm or clipping 31

Line Clipping Algorithms 1. Cohen-Sutherland Line Clipping 2. Liang-Barsky Line Clipping 3. Nicholl-Lee-Nicholl Line Clipping 4. Line Clipping Using Nonrectangular Clip Windows 5. Splitting Concave Polygons 32

Polygon Clipping The output of a polygon clipper should be a sequence of vertices that defines the clipped polygon boundaries Sutherland-Hodgeman Polygon Clipping Weiler Atherton Polygon Clipping 33

Other Algorithms 1. Curve Clipping 2. Text Clipping 3. Exterior Clipping 34

Structures & Hierarchical Modeling Structure Concepts Editing Structures Basic Modeling Concepts Model Representation Symbol Hierarchies Modeling Packages Hierarchical Modeling with Structures 35

Interactive input methods Input Modes Request mode Sample mode Event Mode Initial Values for Input Device Parameters Size of pick window minimum pick distance Type and size of cursor display type of structure highlighting during pick operations range for valuator input resolution for valuator input 36

Virtual Reality Environment Interactive input is accomplished in this environment with a data glove, which is capable of grasping and moving objects displayed in a virtual scene Another method for generating virtual scenes is to display stereoscopic projections on a raster monitor, with the two stereoscopic views displayed on alternate refresh cycles 37

Physical Input Devices 38

39

Interactive Picture Construction Techniques Basic Positioning Methods Constraints Grids Gravity Field Rubber band Method Dragging Painting and Drawing 40

Interactive Picture Construction Methods Interactive picture- construction methods are commonly used in variety of applications, including design and painting packages. These methods provide user with the capability to position objects, to constrain fig. to predefined orientations or alignments, to sketch fig., and to drag objects around the screen. Grids, gravity fields, and rubber band methods are used to aid in positioning and other picture construction operations. 41

Unit IV- Syllabus Three - dimensional concepts Three dimensional display methods Parallel Projection Perspective Projection Depth Cueing Visible line and surface identification Three dimensional transformation. 42

Three - Dimensional Concepts It is the field of computer graphics that deals with generating and displaying three dimensional objects in a two-dimensional space (eg: display screen) In addition to color and brightness, a 3-D pixels adds a depth property that indicates where the point lies on the imaginary When many 3-D pixels are combined, each with its own depth value, the result is a 3-D surface called a texture. Objects are created on a 3-D stage where the current view is derived from the camera and light sources, similar to the real world. 43

Three-Dimensional Display Methods Parallel projection Project points on the object surface along parallel lines onto the display plane. Parallel lines are still parallel after projection. Used in engineering and architectural drawings. By selecting different viewing positions, we can project visible points on the object onto the display plane to obtain different two-dimensional views of the object. 44

Parallel Projection It has two major characteristics 1. Smaller as their distance from the observer increases. 2. Foreshortened: the size of an object s dimension along the line of sight are relatively shorter than dimensions across the line of sight. 45

Three - Dimensional Concepts Perspective projection Project points to the display plane along converging paths. This is the way that our eyes and a camera lens form images and so the displays are more realistic. 46

Depth Cueing To easily identify the front and back of display objects. Depth information can be included using various methods. A simple method to vary the intensity of objects according to their distance from the viewing position. Application is modeling the effect of the atmosphere on the pixel intensity of objects. More distant objects appear dimmer to us than nearer objects due to light scattering by dust particles, smoke etc. 47

Visible Line And Surface Identification Highlight the visible lines or display them in different color Display nonvisible lines as dashed lines Remove the nonvisible lines 48

Surface Rendering Set the surface intensity of objects according to Lighting conditions in the scene Assigned surface characteristics Lighting specifications include the intensity and positions of light sources and the general background illumination required for a scene. Surface properties include degree of transparency and how rough or smooth the surfaces are to be. 49

Exploded and Cutaway Views To maintain a hierarchical structures to include internal details. These views show the internal structure and relationships of the object parts 50

Cutaway view Remove part of the visible surfaces to show internal structure. 51

Three-dimensional And Stereoscopic Views 52

Three-dimensional Transformation 1. Generalize from 2D by including z coordinate 2. Straightforward for translation and scale, rotation more difficult 3. Homogeneous coordinates: 4 components 4. Transformation matrices: 4 4 elements 53

3D Translation An Object represented as a set of polygon surfaces, is translated by translate each vertex of each surface and redraw the polygon facets in the new position. T t x, t y, t z x, y, z x ', y ', z ' Inverse Translation: T (t, t, t ) T ( t, t, t ) 1 x y z x y z 54

3D Rotation In general, rotations are specified by a rotation axis and an angle. In two-dimensions there is only one choice of a rotation axis that leaves points in the plane. 55

UNIT V-Syllabus Three dimensional viewing Projection Viewing transformation Implementation of viewing operations Hidden surface and Hidden line removal Backface removals. 56

Three Dimensional Viewing We can view an object from any spatial position, eg. In front of an object, Behind the object, In the middle of a group of objects, Inside an object, etc. 3D descriptions of objects must be projected onto the flat viewing surface of the output device. The clipping boundaries enclose a volume of space. 57

3D Viewing The steps for computer generation of a view of a three dimensional scene are somewhat analogous to the processes involved in taking a photograph. 58

Camera Analogy 1. Viewing position 2. Camera orientation 3. Size of clipping window Orientation Window (aperture) of the camera Position 59

Viewing Pipeline The general processing steps for modeling and converting a world coordinate description of a scene to device coordinates: 60

Viewing Coordinates Viewing coordinates system described 3D objects with respect to a viewer. A Viewing (Projector) plane is set up perpendicular to zv and aligned with (xv,yv). 61

Projection Convert the viewing coordinate description of the scene to coordinate positions on the projection plane. Convert the viewing coordinate description of the scene to 3D coordinate positions on display the projection Viewing objects on a 2D requires plane. from 3D to 2D. a mapping Viewing 3D objects on a 2D display requires a mapping from 3D to 2D. 62

Projection Parallel Projection : Coordinate position are transformed to the view plane along parallel lines. Perspective Projection: Object positions are transformed to the view plane along lines that converge to the projection reference (center) point. 63

Parallel and Perspective Projection 64

3D Object Representations Methods ß Polygon and Quadric surfaces: For simple Euclidean objects ß Spline surfaces and construction: For curved surfaces ß Procedural methods: Eg. Fractals, Particle systems ß Physically based modeling methods ß Octree Encoding ß Isosurface displays, Volume rendering, etc. Classification: Boundary Representations (B-reps) eg. Polygon facets and spline patches Space-partitioning representations eg. Octree Representation Objects may also associate with other properties such as mass, volume, so as to determine their response to stress and temperature etc. 65

Visibility Assumption: All polygons are opaque What polygons are visible with respect to your view frustum? Outside: View Frustum Clipping Remove polygons outside of the view volume For example, Liang-Barsky 3D Clipping Inside: Hidden Surface Removal Backface culling Polygons facing away from the viewer Occlusion Polygons farther away are obscured by closer polygons Full or partially occluded portions Why should we remove these polygons? Avoid unnecessary expensive operations on these polygons later 66

Backface Culling Avoid drawing polygons facing away from the viewer Front-facing polygons occlude these polygons in a closed polyhedron Test if a polygon is front- or back-facing? back-facing front-facing 67

Detecting Back-face Polygons The polygon normal of a front-facing polygon points towards the viewer back-facing polygon points away from the viewer If (n v) > 0 back-face If (n v) 0 front-face v = view vector Eye-space test EASY! back-face if nz < 0 glcullface(gl_back) 68

Z-Buffer Depth buffer (Z-Buffer) A secondary image buffer that holds depth values Same pixel resolution as the color buffer Why is it called a Z-Buffer? After eye space, depth is simply the z-coordinate Sorting is done at the pixel level Rule: Only draw a polygon at a pixel if it is closer than a polygon that has already been drawn to this pixel 69

Z-buffer: A Secondary Buffer Color buffer Depth buffer 70