Set the Viewport. Set the Viewport Clipping. Set the Viewport. Set the Viewport. Set the Viewport. Resizing the Viewport W = H

Size: px
Start display at page:

Download "Set the Viewport. Set the Viewport Clipping. Set the Viewport. Set the Viewport. Set the Viewport. Resizing the Viewport W = H"

Transcription

1 To draw an undistorted version of the data in a viewport, you need to ensure the viewport and the window have the same aspect ratio. i.e. W H window window W = H viewport viewport Computer Graphics CSC470 1 Computer Graphics CSC470 2 Recall, if the aspect ratio of a rectangle is less than 0, the rectangle is taller than wide. E.g. W/H = 3/5 If the aspect ratio is greater than 0, the rectangle is wider than tall. E.g. W/H = 5/3 a) R > W/H (where R is the aspect ratio of the world window) If the world window is flatter than the screen window, there will be unused space above and/or below. The width of the world window will be mapped to the entire width of the screen window. setviewport(0,w,0,w/r); Computer Graphics CSC470 3 Computer Graphics CSC470 4 b) R < W/H (where R is the aspect ratio of the world window) If the world window is taller than the screen window, there will be unused space on the sides. The height of the world window will be mapped to the entire height of the screen window. setviewport(0,h*r,0,h); Resizing the Viewport In a windows environment, the user may resize the screen window and therefore affect the viewport while the program is running. When this occurs, you will want to be able to ensure redrawing of the image occurs within the same aspect ratio. Computer Graphics CSC470 5 Computer Graphics CSC

2 Resizing the Viewport OpenGL provides a resize event that is called when the user resizes a window. This can be linked to your own resizing function. glutreshapefunc( myreshape); This works the same as for the glutmousefunc and glutkeyboardfunc If you don t run a glviewport after a window resize, the glviewport defaults to the window coordinates. Resizing the Viewport void myreshape(glsizei W, GLsizei H) { //R is the aspect ratio of the world window if(r > W/H) //use global window aspect ratio setviewport(0, W, 0, W/R); else setviewport(0, H*R, 0, H); } -example322.cpp Computer Graphics CSC470 7 Computer Graphics CSC470 8 is fundamental in Computer Graphics. It means to discard parts of the image that are not in the viewport. OpenGL takes care of clipping for you, but you still need to understand how it works. : Remove points outside a region of interest. Want to discard everything that s outside of our window... Primitives: point, line-segment, and polygon. Point clipping: Remove points outside window. A point is either entirely inside the region or not. Line-segment clipping: Remove portion of line segment outside window. Line segments can straddle the region boundary. Polygon clipping: Remove portion of polygon outside window Computer Graphics CSC Trivially Accept or Reject if both ends of a line lie inside the window (e.g. AB) then the line can be trivially accepted as it doesn t need to be clipped. if both ends of a line lie outside the window (e.g. CD) then the line can be trivially rejected as all of it is clipped. Testing for Trivial Acceptance or Rejection Divide the window and surrounding areas and assign codes. Left,Above,Right,Below Computer Graphics CSC Computer Graphics CSC

3 Testing for Trivial Acceptance or Rejection 1. Divide the window and surrounding areas and assign codes. 2. Assign the code to the end points of the line. P 1 = TTFF, P 2 = FFFF Trivially Accept if both points have the code FFFF P Trivially Reject if both points have a 1 T in the same position e.g. both P 2 points are left, above, right or below the window. when there is neither trivial accept nor reject. A line that cannot be trivial accepted or rejected will have one end point inside the window and one outside, or; Will have one endpoint on one side and the other endpoint on the other so that the line crosses the window. These lines need to be chopped at the window border intersections. Computer Graphics CSC Computer Graphics CSC Line Example Clip a line against 1 edge of the viewport What do we know? Similar triangles A / B = C / D B = (x2 -x1) A = (y2 -y1) C = (y1 -ymax) D = BC / A (x, y ) = (x1 -D, ymax) C A (x1, y1) (x, y )??? D (x2, y2) B We need to determine where A is. its x coordinate is window.right its y coordinate can be calculated using similar triangles.. d = dely e delx Computer Graphics CSC Computer Graphics CSC We need to determine where A is. e = p1.x W.right delx = p2.x p1.x; dely = p2.y p1.y; d = e/delx * dely; p1.y += (W.right p1.x) * dely/delx Computer Graphics CSC Computer Graphics CSC

4 Perform the Cohen-Sutherland for the following lines: (15,15) (20,20) (60,90) (90,90) (55,65) (110,120) what lines are you left with? TTFF FTFF FTTF 20, 20 15, , , 90 90, 90 TFFF FFFF FFTF 55, 65 TFFT FFFT FFTT Computer Graphics CSC Computer Graphics CSC (15,15) TFFT (20,20) TFFT (reject) (60,90) FFFF (90,90) FFFF (accept) (55,65) FFFF (110,120) FTTF (keep and clip) (55,65) (110,120) (clip right point on top border of right) For top border y = 100, therefore find the point on the line where y = 100. Use y = mx + c and solve for y = 100; m = 1, c = 10. x = 90 The line is now (55,65)(90,100) 60, 90 90, 90 55, , 120 Computer Graphics CSC Computer Graphics CSC D Line-clip Algorithm Polygon Not as simple as line segment clipping a line segment yields at most one line segment a polygon can yield multiple polygons Half-space now lies on one side of a plane. Implicit formula for plane in 3D is same as that for line in 2D. Parametric formula for line to be clipped is unchanged. Use 6-bit outcodes When needed, clip line segment against planes However, clipping a convex polygon can yield at most one other polygon Computer Graphics CSC

5 Polygons (1) Step by step example of polygon clipping Computer Graphics CSC Computer Graphics CSC Pipeline of Polygons Three dimensions: add front and back clippers Computer Graphics CSC

Set the Viewport Clipping. Computer Graphics CSC470 1

Set the Viewport Clipping. Computer Graphics CSC470 1 Set the Viewport Clipping Computer Graphics CSC470 1 Set the Viewport To draw an undistorted version of the data in a viewport, you need to ensure the viewport and the window have the same aspect ratio.

More information

Windows and Viewports. Windows and Viewports. Windows and Viewports. Windows and Viewports. CSC 706 Computer Graphics

Windows and Viewports. Windows and Viewports. Windows and Viewports. Windows and Viewports. CSC 706 Computer Graphics CSC 706 Computer Graphics World World Window, Screen Window and Viewport Setting Window and Viewport automatically Tiling Previously we looked at an OpenGL window where x and y were plotted as positive

More information

From 3D World to 2D Screen. Hendrik Speleers

From 3D World to 2D Screen. Hendrik Speleers Hendrik Speleers Overview Synthetic camera Rendering pipeline World window versus viewport Clipping Cohen-Sutherland algorithm Rasterizing Bresenham algorithm Three different actors in a scene Objects:

More information

More on Coordinate Systems. Coordinate Systems (3) Coordinate Systems (2) Coordinate Systems (5) Coordinate Systems (4) 9/15/2011

More on Coordinate Systems. Coordinate Systems (3) Coordinate Systems (2) Coordinate Systems (5) Coordinate Systems (4) 9/15/2011 Computer Graphics using OpenGL, Chapter 3 Additional Drawing Tools More on Coordinate Systems We have been using the coordinate system of the screen window (in pixels). The range is from 0 (left) to some

More information

Computer Graphics (CS 543) Lecture 9 (Part 2): Clipping. Prof Emmanuel Agu. Computer Science Dept. Worcester Polytechnic Institute (WPI)

Computer Graphics (CS 543) Lecture 9 (Part 2): Clipping. Prof Emmanuel Agu. Computer Science Dept. Worcester Polytechnic Institute (WPI) Computer Graphics (CS 543) Lecture 9 (Part 2): Clipping Prof Emmanuel Agu Computer Science Dept. Worcester Polytechnic Institute (WPI) OpenGL Stages After projection, several stages before objects drawn

More information

Last class. A vertex (w x, w y, w z, w) - clipping is in the - windowing and viewport normalized view volume if: - scan conversion/ rasterization

Last class. A vertex (w x, w y, w z, w) - clipping is in the - windowing and viewport normalized view volume if: - scan conversion/ rasterization Lecture 6 Last class Last lecture (clip coordinates): A vertex (w x, w y, w z, w) - clipping is in the - windowing and viewport normalized view volume if: - scan conversion/ rasterization normalized view

More information

CHAPTER 3. More Drawing Tools.

CHAPTER 3. More Drawing Tools. (For ECE660 - Fall, 1999) CHAPTER 3. More Drawing Tools. Goals of the Chapter Introduce viewports and clipping Develop the window to viewport transformation Develop a classical clipping algorithm Create

More information

3D Rendering Pipeline (for direct illumination)

3D Rendering Pipeline (for direct illumination) Clipping 3D Rendering Pipeline (for direct illumination) 3D Primitives 3D Modeling Coordinates Modeling Transformation Lighting 3D Camera Coordinates Projection Transformation Clipping 2D Screen Coordinates

More information

Clipping Points Consider a clip window which is rectangular in shape. P(x, y) is a point to be displayed.

Clipping Points Consider a clip window which is rectangular in shape. P(x, y) is a point to be displayed. Usually only a specified region of a picture needs to be displayed. This region is called the clip window. An algorithm which displays only those primitives (or part of the primitives) which lie inside

More information

Clipping Lines. Dr. Scott Schaefer

Clipping Lines. Dr. Scott Schaefer Clipping Lines Dr. Scott Schaefer Why Clip? We do not want to waste time drawing objects that are outside of viewing window (or clipping window) 2/94 Clipping Points Given a point (x, y) and clipping window

More information

Graphics and Visualization

Graphics and Visualization International University Bremen Spring Semester 2006 Recap Display Devices First Lab Course OpenGL OpenGL is the premier environment for developing portable, interactive 2D and 3D graphics applications.

More information

Chapter 8: Implementation- Clipping and Rasterization

Chapter 8: Implementation- Clipping and Rasterization Chapter 8: Implementation- Clipping and Rasterization Clipping Fundamentals Cohen-Sutherland Parametric Polygons Circles and Curves Text Basic Concepts: The purpose of clipping is to remove objects or

More information

Clipping and Intersection

Clipping and Intersection Clipping and Intersection Clipping: Remove points, line segments, polygons outside a region of interest. Need to discard everything that s outside of our window. Point clipping: Remove points outside window.

More information

From Vertices To Fragments-1

From Vertices To Fragments-1 From Vertices To Fragments-1 1 Objectives Clipping Line-segment clipping polygon clipping 2 Overview At end of the geometric pipeline, vertices have been assembled into primitives Must clip out primitives

More information

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

Clipping & Culling. Lecture 11 Spring Trivial Rejection Outcode Clipping Plane-at-a-time Clipping Backface Culling Clipping & Culling Trivial Rejection Outcode Clipping Plane-at-a-time Clipping Backface Culling Lecture 11 Spring 2015 What is Clipping? Clipping is a procedure for spatially partitioning geometric primitives,

More information

Two-Dimensional Viewing. Chapter 6

Two-Dimensional Viewing. Chapter 6 Two-Dimensional Viewing Chapter 6 Viewing Pipeline Two-Dimensional Viewing Two dimensional viewing transformation From world coordinate scene description to device (screen) coordinates Normalization and

More information

CS123 INTRODUCTION TO COMPUTER GRAPHICS. Clipping. Concepts, Algorithms for line clipping. 1 of 16. Andries van Dam. Clipping - 10/12/17

CS123 INTRODUCTION TO COMPUTER GRAPHICS. Clipping. Concepts, Algorithms for line clipping. 1 of 16. Andries van Dam. Clipping - 10/12/17 Clipping Concepts, Algorithms for line clipping 1 of 16 Line Clipping in 2D Clipping endpoints If x min x x max and y min y y max, the point is inside the clip rectangle. Endpoint analysis for lines: if

More information

Sung-Eui Yoon ( 윤성의 )

Sung-Eui Yoon ( 윤성의 ) CS380: Computer Graphics Clipping and Culling Sung-Eui Yoon ( 윤성의 ) Course URL: http://sglab.kaist.ac.kr/~sungeui/cg/ Class Objectives Understand clipping and culling Understand view-frustum, back-face

More information

Clipping Algorithms; 8-5. Computer Graphics. Spring CS4815

Clipping Algorithms; 8-5. Computer Graphics. Spring CS4815 Computer Graphics Spring 2016-2017 Outline Clipping Algorithms; 8-5 1 Clipping Algorithms; 8-5 Announcements Mid-term: Week07?? Clipping: Introduction It is common for a region to be defined so that only

More information

Clipping and Scan Conversion

Clipping and Scan Conversion 15-462 Computer Graphics I Lecture 14 Clipping and Scan Conversion Line Clipping Polygon Clipping Clipping in Three Dimensions Scan Conversion (Rasterization) [Angel 7.3-7.6, 7.8-7.9] March 19, 2002 Frank

More information

Examples. Clipping. The Rendering Pipeline. View Frustum. Normalization. How it is done. Types of operations. Removing what is not seen on the screen

Examples. Clipping. The Rendering Pipeline. View Frustum. Normalization. How it is done. Types of operations. Removing what is not seen on the screen Computer Graphics, Lecture 0 November 7, 006 Eamples Clipping Types of operations Accept Reject Clip Removing what is not seen on the screen The Rendering Pipeline The Graphics pipeline includes one stage

More information

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

Overview. Pipeline implementation I. Overview. Required Tasks. Preliminaries Clipping. Hidden Surface removal Overview Pipeline implementation I Preliminaries Clipping Line clipping Hidden Surface removal Overview At end of the geometric pipeline, vertices have been assembled into primitives Must clip out primitives

More information

Clipping. Angel and Shreiner: Interactive Computer Graphics 7E Addison-Wesley 2015

Clipping. Angel and Shreiner: Interactive Computer Graphics 7E Addison-Wesley 2015 Clipping 1 Objectives Clipping lines First of implementation algorithms Clipping polygons (next lecture) Focus on pipeline plus a few classic algorithms 2 Clipping 2D against clipping window 3D against

More information

Realtime 3D Computer Graphics Virtual Reality

Realtime 3D Computer Graphics Virtual Reality Realtime 3D Computer Graphics Virtual Reality From Vertices to Fragments Overview Overall goal recapitulation: Input: World description, e.g., set of vertices and states for objects, attributes, camera,

More information

Illumination Models III: Ray Tracing (View Dependent Global Illumination)

Illumination Models III: Ray Tracing (View Dependent Global Illumination) Illumination Models III: Ray Tracing (View Dependent Global Illumination) The University of Texas at Austin 1 Basic Definitions Ray Tracing/Casting: Setting: eyepoint, virtual screen (an array of virtual

More information

COMPUTATIONAL GEOMETRY

COMPUTATIONAL GEOMETRY Thursday, September 20, 2007 (Ming C. Lin) Review on Computational Geometry & Collision Detection for Convex Polytopes COMPUTATIONAL GEOMETRY (Refer to O'Rourke's and Dutch textbook ) 1. Extreme Points

More information

Computer Graphics. - Clipping - Philipp Slusallek & Stefan Lemme

Computer Graphics. - Clipping - Philipp Slusallek & Stefan Lemme Computer Graphics - Clipping - Philipp Slusallek & Stefan Lemme Clipping Motivation Projected primitive might fall (partially) outside of the visible display window E.g. if standing inside a building Eliminate

More information

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

3D Polygon Rendering. Many applications use rendering of 3D polygons with direct illumination Rendering Pipeline 3D Polygon Rendering Many applications use rendering of 3D polygons with direct illumination 3D Polygon Rendering What steps are necessary to utilize spatial coherence while drawing

More information

Part IV. 2D Clipping

Part IV. 2D Clipping Part IV 2D Clipping The Liang-Barsky algorithm Boolean operations on polygons Outline The Liang-Barsky algorithm Boolean operations on polygons Clipping The goal of clipping is mainly to eliminate parts

More information

2D Image Synthesis. 2D image synthesis. Raster graphics systems. Modeling transformation. Vectorization. u x u y 0. o x o y 1

2D Image Synthesis. 2D image synthesis. Raster graphics systems. Modeling transformation. Vectorization. u x u y 0. o x o y 1 General scheme of a 2D CG application 2D Image Synthesis Balázs Csébfalvi modeling image synthesis Virtual world model world defined in a 2D plane Department of Control Engineering and Information Technology

More information

Viewing Transformation. Clipping. 2-D Viewing Transformation

Viewing Transformation. Clipping. 2-D Viewing Transformation Viewing Transformation Clipping 2-D Viewing Transformation 2-D Viewing Transformation Convert from Window Coordinates to Viewport Coordinates (xw, yw) --> (xv, yv) Maps a world coordinate window to a screen

More information

CSCI 4620/8626. Computer Graphics Clipping Algorithms (Chapter 8-5 )

CSCI 4620/8626. Computer Graphics Clipping Algorithms (Chapter 8-5 ) CSCI 4620/8626 Computer Graphics Clipping Algorithms (Chapter 8-5 ) Last update: 2016-03-15 Clipping Algorithms A clipping algorithm is any procedure that eliminates those portions of a picture outside

More information

FROM VERTICES TO FRAGMENTS. Lecture 5 Comp3080 Computer Graphics HKBU

FROM VERTICES TO FRAGMENTS. Lecture 5 Comp3080 Computer Graphics HKBU FROM VERTICES TO FRAGMENTS Lecture 5 Comp3080 Computer Graphics HKBU OBJECTIVES Introduce basic implementation strategies Clipping Scan conversion OCTOBER 9, 2011 2 OVERVIEW At end of the geometric pipeline,

More information

Computer Graphics Viewing Objective

Computer Graphics Viewing Objective Computer Graphics Viewing Objective The aim of this lesson is to make the student aware of the following concepts: Window Viewport Window to Viewport Transformation line clipping Polygon Clipping Introduction

More information

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

3D Graphics Pipeline II Clipping. Instructor Stephen J. Guy 3D Graphics Pipeline II Clipping Instructor Stephen J. Guy 3D Rendering Pipeline (for direct illumination) 3D Geometric Primitives 3D Model Primitives Modeling Transformation 3D World Coordinates Lighting

More information

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

Computer Graphics. The Two-Dimensional Viewing. Somsak Walairacht, Computer Engineering, KMITL Computer Graphics Chapter 6 The Two-Dimensional Viewing Somsak Walairacht, Computer Engineering, KMITL Outline The Two-Dimensional Viewing Pipeline The Clipping Window Normalization and Viewport Transformations

More information

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

Renderer Implementation: Basics and Clipping. Overview. Preliminaries. David Carr Virtual Environments, Fundamentals Spring 2005 INSTITUTIONEN FÖR SYSTEMTEKNIK LULEÅ TEKNISKA UNIVERSITET Renderer Implementation: Basics and Clipping David Carr Virtual Environments, Fundamentals Spring 2005 Feb-28-05 SMM009, Basics and Clipping 1

More information

DHANALAKSHMI COLLEGE OF ENGINEERING, CHENNAI

DHANALAKSHMI COLLEGE OF ENGINEERING, CHENNAI DHANALAKSHMI COLLEGE OF ENGINEERING, CHENNAI Department of Computer Science and Engineering CS6504-COMPUTER GRAPHICS Anna University 2 & 16 Mark Questions & Answers Year / Semester: III / V Regulation:

More information

CS 450: COMPUTER GRAPHICS REVIEW: CLIPPING SPRING 2015 DR. MICHAEL J. REALE

CS 450: COMPUTER GRAPHICS REVIEW: CLIPPING SPRING 2015 DR. MICHAEL J. REALE CS 45: COMPUTER GRAPHICS REVIEW: CLIPPING SPRING 215 DR. MICHAEL J. REALE CLIPPING Clipping = removing part or all of the primitives otside of the clipping volme/window Clipping volme in OpenGL nit cbe

More information

2D rendering takes a photo of the 2D scene with a virtual camera that selects an axis aligned rectangle from the scene. The photograph is placed into

2D rendering takes a photo of the 2D scene with a virtual camera that selects an axis aligned rectangle from the scene. The photograph is placed into 2D rendering takes a photo of the 2D scene with a virtual camera that selects an axis aligned rectangle from the scene. The photograph is placed into the viewport of the current application window. A pixel

More information

Binghamton University. EngiNet. Thomas J. Watson. School of Engineering and Applied Science. Computer Graphics. State University of New York.

Binghamton University. EngiNet. Thomas J. Watson. School of Engineering and Applied Science. Computer Graphics. State University of New York. Binghamton University EngiNet State University of New York EngiNet Thomas J. Watson School of Engineering and Applied Science WARNING All rights reserved. No Part of this video lecture series may be reproduced

More information

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

CS452/552; EE465/505. Clipping & Scan Conversion CS452/552; EE465/505 Clipping & Scan Conversion 3-31 15 Outline! From Geometry to Pixels: Overview Clipping (continued) Scan conversion Read: Angel, Chapter 8, 8.1-8.9 Project#1 due: this week Lab4 due:

More information

521493S Computer Graphics Exercise 1 (Chapters 1-3)

521493S Computer Graphics Exercise 1 (Chapters 1-3) 521493S Computer Graphics Exercise 1 (Chapters 1-3) 1. Consider the clipping of a line segment defined by the latter s two endpoints (x 1, y 1 ) and (x 2, y 2 ) in two dimensions against a rectangular

More information

2D Viewing. Viewing Pipeline: Window-Viewport Transf.

2D Viewing. Viewing Pipeline: Window-Viewport Transf. Viewing Pipeline: Window-Viewport Transf. 2D Viewing yw max clipping window: what to display viewport: where to be viewed translation, rotation, scaling, clipping,... Clipping Window yv max Viewport yv

More information

Topics. From vertices to fragments

Topics. From vertices to fragments Topics From vertices to fragments From Vertices to Fragments Assign a color to every pixel Pass every object through the system Required tasks: Modeling Geometric processing Rasterization Fragment processing

More information

Computer Graphics Geometry and Transform

Computer Graphics Geometry and Transform ! Computer Graphics 2014! 5. Geometry and Transform Hongxin Zhang State Key Lab of CAD&CG, Zhejiang University 2014-10-11! Today outline Triangle rasterization Basic vector algebra ~ geometry! Antialiasing

More information

Introduction to Computer Graphics 5. Clipping

Introduction to Computer Graphics 5. Clipping Introduction to Computer Grapics 5. Clipping I-Cen Lin, Assistant Professor National Ciao Tung Univ., Taiwan Textbook: E.Angel, Interactive Computer Grapics, 5 t Ed., Addison Wesley Ref:Hearn and Baker,

More information

CS 325 Computer Graphics

CS 325 Computer Graphics CS 325 Computer Graphics 02 / 29 / 2012 Instructor: Michael Eckmann Today s Topics Questions? Comments? Specifying arbitrary views Transforming into Canonical view volume View Volumes Assuming a rectangular

More information

Computer Graphics (CS 543) Lecture 10 (Part 1): 3D Clipping. Prof Emmanuel Agu. Computer Science Dept. Worcester Polytechnic Institute (WPI)

Computer Graphics (CS 543) Lecture 10 (Part 1): 3D Clipping. Prof Emmanuel Agu. Computer Science Dept. Worcester Polytechnic Institute (WPI) Computer Graphics (CS 543) Lecture 10 (Part 1): 3D Clipping Prof Emmanuel Agu Computer Science Dept. Worcester Polytechnic Institute (WPI) Liang Barsky 3D Clipping Goal: Clip object edge-by-edge against

More information

Computer Graphics: Two Dimensional Viewing

Computer Graphics: Two Dimensional Viewing Computer Graphics: Two Dimensional Viewing Clipping and Normalized Window By: A. H. Abdul Hafez Abdul.hafez@hku.edu.tr, 1 Outlines 1. End 2 Transformation between 2 coordinate systems To transform positioned

More information

UNIVERSITY OF NEBRASKA AT OMAHA Computer Science 4620/8626 Computer Graphics Spring 2014 Homework Set 1 Suggested Answers

UNIVERSITY OF NEBRASKA AT OMAHA Computer Science 4620/8626 Computer Graphics Spring 2014 Homework Set 1 Suggested Answers UNIVERSITY OF NEBRASKA AT OMAHA Computer Science 4620/8626 Computer Graphics Spring 2014 Homework Set 1 Suggested Answers 1. How long would it take to load an 800 by 600 frame buffer with 16 bits per pixel

More information

COMP3421. Vector geometry, Clipping

COMP3421. Vector geometry, Clipping COMP3421 Vector geometry, Clipping Transformations Object in model co-ordinates Transform into world co-ordinates Represent points in object as 1D Matrices Multiply by matrices to transform them Coordinate

More information

Unit 6: Connecting Algebra and Geometry Through Coordinates

Unit 6: Connecting Algebra and Geometry Through Coordinates Unit 6: Connecting Algebra and Geometry Through Coordinates The focus of this unit is to have students analyze and prove geometric properties by applying algebraic concepts and skills on a coordinate plane.

More information

UNIT 2. Translation/ Scaling/ Rotation. Unit-02/Lecture-01

UNIT 2. Translation/ Scaling/ Rotation. Unit-02/Lecture-01 UNIT 2 Translation/ Scaling/ Rotation Unit-02/Lecture-01 Translation- (RGPV-2009,10,11,13,14) Translation is to move, or parallel shift, a figure. We use a simple point as a starting point. This is a simple

More information

MODULE - 9. Subject: Computer Science. Module: Line Clipping. Module No: CS/CGV/9

MODULE - 9. Subject: Computer Science. Module: Line Clipping. Module No: CS/CGV/9 Quadrant 1 e-text e-pg Pathshala MODULE - 9 Subject: Computer Science Paper: Computer Graphics and Visualization Module: Line Clipping Module No: CS/CGV/9 Objectives: Understand Cohen-Sutherland Line Clipping

More information

Unit 3 Transformations and Clipping

Unit 3 Transformations and Clipping Transformation Unit 3 Transformations and Clipping Changes in orientation, size and shape of an object by changing the coordinate description, is known as Geometric Transformation. Translation To reposition

More information

Windowing And Clipping (14 Marks)

Windowing And Clipping (14 Marks) Window: 1. A world-coordinate area selected for display is called a window. 2. It consists of a visual area containing some of the graphical user interface of the program it belongs to and is framed by

More information

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

VISIBILITY & CULLING. Don t draw what you can t see. Thomas Larsson, Afshin Ameri DVA338, Spring 2018, MDH VISIBILITY & CULLING Don t draw what you can t see. Thomas Larsson, Afshin Ameri DVA338, Spring 2018, MDH Visibility Visibility Given a set of 3D objects, which surfaces are visible from a specific point

More information

Introduction to Computer Graphics with OpenGL/GLUT

Introduction to Computer Graphics with OpenGL/GLUT Introduction to Computer Graphics with OpenGL/GLUT What is OpenGL? A software interface to graphics hardware Graphics rendering API (Low Level) High-quality color images composed of geometric and image

More information

Graphics System. Processor. Output Display. Input Devices. Frame Buffer. Memory. Array of pixels. Resolution: # of pixels Depth: # of bits/pixel

Graphics System. Processor. Output Display. Input Devices. Frame Buffer. Memory. Array of pixels. Resolution: # of pixels Depth: # of bits/pixel Graphics System Input Devices Processor Memory Frame Buffer Output Display Array of pixels Resolution: # of pixels Depth: # of bits/pixel Input Devices Physical Devices: Keyboard, Mouse, Tablet, etc. Logical

More information

Computer Graphics (4731) Lecture 4: 2D Graphics Systems (Drawing Polylines, tiling, & Aspect Ratio)

Computer Graphics (4731) Lecture 4: 2D Graphics Systems (Drawing Polylines, tiling, & Aspect Ratio) Computer Graphics (4731) Lecture 4: 2D Graphics Systems (Drawing Polylines, tiling, & Aspect Ratio) Prof Emmanuel Agu Computer Science Dept. Worcester Polytechnic Institute (WPI) Screen Coordinate System

More information

Part 3: 2D Transformation

Part 3: 2D Transformation Part 3: 2D Transformation 1. What do you understand by geometric transformation? Also define the following operation performed by ita. Translation. b. Rotation. c. Scaling. d. Reflection. 2. Explain two

More information

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

1 Attempt any three of the following: 1 5 a. What is Computer Graphics? How image is to be display on Video Display Device? (2½ hours) Total Marks: 75 N. B.: (1) All questions are compulsory. (2) Makesuitable assumptions wherever necessary and state the assumptions made. (3) Answers to the same question must be written together.

More information

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

CS602 MCQ,s for midterm paper with reference solved by Shahid #1 Rotating a point requires The coordinates for the point The rotation angles Both of above Page No 175 None of above #2 In Trimetric the direction of projection makes unequal angle with the three principal

More information

Computer Graphics 7: Viewing in 3-D

Computer Graphics 7: Viewing in 3-D Computer Graphics 7: Viewing in 3-D In today s lecture we are going to have a look at: Transformations in 3-D How do transformations in 3-D work? Contents 3-D homogeneous coordinates and matrix based transformations

More information

CS 4204 Computer Graphics

CS 4204 Computer Graphics CS 4204 Computer Graphics GLUT (Continue) More Interactions Yong Cao Virginia Tech References: Interactive Computer Graphics, Fourth Edition, Ed Angle Orthographical Projection Synthetic camera model View

More information

CS184 : Foundations of Computer Graphics Professor David Forsyth Final Examination

CS184 : Foundations of Computer Graphics Professor David Forsyth Final Examination CS184 : Foundations of Computer Graphics Professor David Forsyth Final Examination (Total: 100 marks) Figure 1: A perspective view of a polyhedron on an infinite plane. Cameras and Perspective Rendering

More information

.(3, 2) Co-ordinate Geometry Co-ordinates. Every point has two co-ordinates. Plot the following points on the plane. A (4, 1) D (2, 5) G (6, 3)

.(3, 2) Co-ordinate Geometry Co-ordinates. Every point has two co-ordinates. Plot the following points on the plane. A (4, 1) D (2, 5) G (6, 3) Co-ordinate Geometry Co-ordinates Every point has two co-ordinates. (3, 2) x co-ordinate y co-ordinate Plot the following points on the plane..(3, 2) A (4, 1) D (2, 5) G (6, 3) B (3, 3) E ( 4, 4) H (6,

More information

CS602- Computer Graphics Solved MCQS From Midterm Papers. MIDTERM EXAMINATION Spring 2013 CS602- Computer Graphics

CS602- Computer Graphics Solved MCQS From Midterm Papers. MIDTERM EXAMINATION Spring 2013 CS602- Computer Graphics CS602- Computer Graphics Solved MCQS From Midterm Papers Dec 18,2013 MC100401285 Moaaz.pk@gmail.com Mc100401285@gmail.com PSMD01 Question No: 1 ( Marks: 1 ) - Please choose one DDA abbreviated for. Discrete

More information

Geometry Reasons for Proofs Chapter 1

Geometry Reasons for Proofs Chapter 1 Geometry Reasons for Proofs Chapter 1 Lesson 1.1 Defined Terms: Undefined Terms: Point: Line: Plane: Space: Postulate 1: Postulate : terms that are explained using undefined and/or other defined terms

More information

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

CSE 167: Lecture #4: Vertex Transformation. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012 CSE 167: Introduction to Computer Graphics Lecture #4: Vertex Transformation Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012 Announcements Project 2 due Friday, October 12

More information

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

CS184 : Foundations of Computer Graphics Professor David Forsyth Final Examination (Total: 100 marks) CS184 : Foundations of Computer Graphics Professor David Forsyth Final Examination (Total: 100 marks) Cameras and Perspective Figure 1: A perspective view of a polyhedron on an infinite plane. Rendering

More information

Input and Interaction

Input and Interaction Input and Interaction Adapted from Edward Angel, UNM! Angel: Interactive Computer Graphics 3E Addison-Wesley 2002 Project Sketchpad Ivan Sutherland (MIT 1963) established the basic interactive paradigm

More information

CSE 167: Introduction to Computer Graphics Lecture #4: Vertex Transformation

CSE 167: Introduction to Computer Graphics Lecture #4: Vertex Transformation CSE 167: Introduction to Computer Graphics Lecture #4: Vertex Transformation Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2013 Announcements Project 2 due Friday, October 11

More information

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

CS602 Midterm Subjective Solved with Reference By WELL WISHER (Aqua Leo) CS602 Midterm Subjective Solved with Reference By WELL WISHER (Aqua Leo) www.vucybarien.com Question No: 1 What are the two focusing methods in CRT? Explain briefly. Page no : 26 1. Electrostatic focusing

More information

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

Module Contact: Dr Stephen Laycock, CMP Copyright of the University of East Anglia Version 1 UNIVERSITY OF EAST ANGLIA School of Computing Sciences Main Series UG Examination 217-18 GRAPHICS 1 CMP-51B Time allowed: 2 hours Answer THREE from FOUR questions (4 marks each) Notes are not permitted

More information

What is Clipping? Why do we Clip? Lecture 9 Comp 236 Spring Clipping is an important optimization

What is Clipping? Why do we Clip? Lecture 9 Comp 236 Spring Clipping is an important optimization Clipping, Culling, Picking & Selection Trivial Rejection Outcode Clipping Plane-at-a-time Clipping Backface Culling Picking Selection Programming Assignment #2 Lecture 9 Comp 236 Spring 2005 What is Clipping?

More information

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

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 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 Copyright 2018 Sung-eui Yoon, KAIST freely available on the internet http://sglab.kaist.ac.kr/~sungeui/render

More information

The Graphics Pipeline. Interactive Computer Graphics. The Graphics Pipeline. The Graphics Pipeline. The Graphics Pipeline: Clipping

The Graphics Pipeline. Interactive Computer Graphics. The Graphics Pipeline. The Graphics Pipeline. The Graphics Pipeline: Clipping Interactive Computer Graphics The Graphics Pipeline: The Graphics Pipeline Input: - geometric model - illumination model - camera model - viewport Some slides adopted from F. Durand and B. Cutler, MIT

More information

1999, Denis Zorin. Ray tracing

1999, Denis Zorin. Ray tracing Ray tracing Ray tracing shadow rays normal reflected ray pixel ray camera normal Ray casting/ray tracing Iterate over pixels, not objects. Effects that are difficult with Z-buffer, are easy with ray tracing:

More information

Lesson 21: Surface Area

Lesson 21: Surface Area Lesson 21: Surface Area Classwork Opening Exercise: Surface Area of a Right Rectangular Prism On the provided grid, draw a net representing the surfaces of the right rectangular prism (assume each grid

More information

Computer Graphics: 7-Polygon Rasterization, Clipping

Computer Graphics: 7-Polygon Rasterization, Clipping Computer Graphics: 7-Polygon Rasterization, Clipping Prof. Dr. Charles A. Wüthrich, Fakultät Medien, Medieninformatik Bauhaus-Universität Weimar caw AT medien.uni-weimar.de Filling polygons (and drawing

More information

I can position figures in the coordinate plane for use in coordinate proofs. I can prove geometric concepts by using coordinate proof.

I can position figures in the coordinate plane for use in coordinate proofs. I can prove geometric concepts by using coordinate proof. Page 1 of 14 Attendance Problems. 1. Find the midpoint between (0, x) and (y, z).. One leg of a right triangle has length 1, and the hypotenuse has length 13. What is the length of the other leg? 3. Find

More information

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

Today. CS-184: Computer Graphics. Lecture #10: Clipping and Hidden Surfaces. Clipping. Hidden Surface Removal Today CS-184: Computer Graphics Lecture #10: Clipping and Hidden Surfaces!! Prof. James O Brien University of California, Berkeley! V2015-S-10-1.0 Clipping Clipping to view volume Clipping arbitrary polygons

More information

Computer Graphics Geometry and Transform

Computer Graphics Geometry and Transform Computer Graphics 2012 5. Geometry and Transform Hongxin Zhang State Key Lab of CAD&CG, Zhejiang University 2012-09-26 上机实践 地址 :ftp://give.zju.edu.cn 用户 :cgzhang 密码 :cgzhang 请大家把上机作业结果和报告内容, 上传至 学号 _ 姓名

More information

Chapter 1. Linear Equations and Straight Lines. 2 of 71. Copyright 2014, 2010, 2007 Pearson Education, Inc.

Chapter 1. Linear Equations and Straight Lines. 2 of 71. Copyright 2014, 2010, 2007 Pearson Education, Inc. Chapter 1 Linear Equations and Straight Lines 2 of 71 Outline 1.1 Coordinate Systems and Graphs 1.4 The Slope of a Straight Line 1.3 The Intersection Point of a Pair of Lines 1.2 Linear Inequalities 1.5

More information

Scan Conversion of Polygons. Dr. Scott Schaefer

Scan Conversion of Polygons. Dr. Scott Schaefer Scan Conversion of Polygons Dr. Scott Schaefer Drawing Rectangles Which pixels should be filled? /8 Drawing Rectangles Is this correct? /8 Drawing Rectangles What if two rectangles overlap? 4/8 Drawing

More information

Today s class. Viewing transformation Menus Mandelbrot set and pixel drawing. Informationsteknologi

Today s class. Viewing transformation Menus Mandelbrot set and pixel drawing. Informationsteknologi Today s class Viewing transformation Menus Mandelbrot set and pixel drawing Monday, November 2, 27 Computer Graphics - Class 7 The world & the window World coordinates describe the coordinate system used

More information

CS 543: Computer Graphics. Rasterization

CS 543: Computer Graphics. Rasterization CS 543: Computer Graphics Rasterization Robert W. Lindeman Associate Professor Interactive Media & Game Development Department of Computer Science Worcester Polytechnic Institute gogo@wpi.edu (with lots

More information

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

Cs602-computer graphics MCQS MIDTERM EXAMINATION SOLVED BY ~ LIBRIANSMINE ~ Cs602-computer graphics MCQS MIDTERM EXAMINATION SOLVED BY ~ LIBRIANSMINE ~ Question # 1 of 10 ( Start time: 08:04:29 PM ) Total Marks: 1 Sutherland-Hodgeman clipping algorithm clips any polygon against

More information

The statement implies that any three intersection points of two distinct planes lie on a line.

The statement implies that any three intersection points of two distinct planes lie on a line. Math 3181 Dr. Franz Rothe February 23, 2015 All3181\3181_spr15ts1.tex 1 Solution of Test Name: Problem 1.1. The second part of Hilbert s Proposition 1 states: Any two different planes have either no point

More information

Answer Key: Three-Dimensional Cross Sections

Answer Key: Three-Dimensional Cross Sections Geometry A Unit Answer Key: Three-Dimensional Cross Sections Name Date Objectives In this lesson, you will: visualize three-dimensional objects from different perspectives be able to create a projection

More information

Einführung in Visual Computing

Einführung in Visual Computing Einführung in Visual Computing 186.822 Rasterization Werner Purgathofer Rasterization in the Rendering Pipeline scene objects in object space transformed vertices in clip space scene in normalized device

More information

Three Dimensional Geometry. Linear Programming

Three Dimensional Geometry. Linear Programming Three Dimensional Geometry Linear Programming A plane is determined uniquely if any one of the following is known: The normal to the plane and its distance from the origin is given, i.e. equation of a

More information

heptagon; not regular; hexagon; not regular; quadrilateral; convex concave regular; convex

heptagon; not regular; hexagon; not regular; quadrilateral; convex concave regular; convex 10 1 Naming Polygons A polygon is a plane figure formed by a finite number of segments. In a convex polygon, all of the diagonals lie in the interior. A regular polygon is a convex polygon that is both

More information

Implicit Generalized Cylinders using Profile Curves

Implicit Generalized Cylinders using Profile Curves Implicit Generalized Cylinders using Profile Curves Cindy M. Grimm Presentation by: Miranda Steed Previous Work Traditional definitions using cross sections most suited to CAD/CAM modeling Profile curve

More information

Geometry Practice. 1. Angles located next to one another sharing a common side are called angles.

Geometry Practice. 1. Angles located next to one another sharing a common side are called angles. Geometry Practice Name 1. Angles located next to one another sharing a common side are called angles. 2. Planes that meet to form right angles are called planes. 3. Lines that cross are called lines. 4.

More information

CMSC 425: Lecture 4 More about OpenGL and GLUT Tuesday, Feb 5, 2013

CMSC 425: Lecture 4 More about OpenGL and GLUT Tuesday, Feb 5, 2013 CMSC 425: Lecture 4 More about OpenGL and GLUT Tuesday, Feb 5, 2013 Reading: See any standard reference on OpenGL or GLUT. Basic Drawing: In the previous lecture, we showed how to create a window in GLUT,

More information

FORMULAS to UNDERSTAND & MEMORIZE

FORMULAS to UNDERSTAND & MEMORIZE 1 of 6 FORMULAS to UNDERSTAND & MEMORIZE Now we come to the part where you need to just bear down and memorize. To make the process a bit simpler, I am providing all of the key info that they re going

More information

2D Graphics Primitives II. Additional issues in scan converting lines. 1)Endpoint order. Want algorithms to draw the same pixels for each line

2D Graphics Primitives II. Additional issues in scan converting lines. 1)Endpoint order. Want algorithms to draw the same pixels for each line walters@buffalo.edu CSE 480/580 Lecture 8 Slide 1 2D Graphics Primitives II Additional issues in scan converting lines 1)Endpoint order Want algorithms to draw the same pixels for each line How handle?

More information