Module Contact: Dr R J Lapeer, CMP Copyright of the University of East Anglia Version 1

Size: px
Start display at page:

Download "Module Contact: Dr R J Lapeer, CMP Copyright of the University of East Anglia Version 1"

Transcription

1 UNIVERSITY OF EAST ANGLIA School of Computing Sciences Main Series UG Examination GRAPHICS 1 CMPC2G04 Time allowed: 2 hours Answer THREE questions out of FOUR. (40 marks each) Notes are not permitted in this examination. Do not turn over until you are told to do so by the invigilator. CMPC2G04 Module Contact: Dr R J Lapeer, CMP Copyright of the University of East Anglia Version 1

2 Page 2 1. The window in Figure 1 (a) below shows a bug which is capable of crawling across the screen in any possible direction. The user interface is keyboard and mouse based. The left and right keyboard arrows allow the bug to rotate around its own axis in anti-clockwise and clockwise directions respectively, whilst the up and down arrows allow the bug to accelerate or decelerate respectively. Once the left mouse button is activated, the bug starts moving forwards according to a velocity vector with a speed set by the up and down arrows and a direction set by the left and right arrows. Additionally, three rotating clusters of three triangles, squares and circles, respectively, surround the bug. The individual polygons rotate around their centre, whilst their clusters can rotate around the cluster centre and finally all clusters rotate collectively around the screen centre (similar to a teacup ride on the fairground). There is collision detection enabled between the bug and the rotating objects, the latter being capable of knocking the bug backwards once they collide. The aim of the game is to let the bug escape without being hit by the rotating objects. A demo (executable) of this simple game was shown during the lectures. (a) (b) Figure 1. a. Figure 1(b) shows the update of the bug s position. The variable dmove in the code corresponds to the speed (length of velocity vector v) of the bug and is determined by the up and downward arrows. From the figure it can be seen that the update for the x coordinate is given by the following equation: x n x0 dmove cos( / 2 )

3 Page 3 Where x 0 is the x-coordinate of the current position and x n is the x-coordinate of the next position. Tasks: i. Write down the equation used to update the y-coordinate. [3 marks] ii. Why is /2 added to? [4 marks] b. A snippet of the display function for this 2D game is shown below: void display(void) { glclear(gl_color_buffer_bit); setrotmat(m,pi*spin[0]/180.0,2); glcolor3f(0.0,1.0,0.0); Idisplay(theTriangle,-25.0,25.0); glcolor3f(1.0,0.0,0.0); Idisplay(theSquare,0, ); glcolor3f(0.0,0.0,1.0); Idisplay(theCircle,25.0,25.0); glpushmatrix(); glenable(gl_texture_2d); glbindtexture(gl_texture_2d,texname); glcolor3f(1.0,1.0,1.0); xn=xo+dmove*cos(pi/2+alpha*pi/180.0); yn=yo+dmove*sin(pi/2+alpha*pi/180.0); xo=xn;yo=yn; settramat(mb1,xn,yn,0.0); setrotmat(mb2,pi*alpha/180.0,2); MultMat(mb1,mb2,mb); glloadmatrixf(mb); glbegin(gl_quads); gltexcoord2f(0.0,0.0); glvertex2f(bugpoly.vert[0].x,bugpoly.vert[0].y); gltexcoord2f(1.0,0.0); glvertex2f(bugpoly.vert[1].x,bugpoly.vert[1].y); gltexcoord2f(1.0,1.0); glvertex2f(bugpoly.vert[2].x,bugpoly.vert[2].y); gltexcoord2f(0.0,1.0); glvertex2f(bugpoly.vert[3].x,bugpoly.vert[3].y); glend(); glpopmatrix(); glutswapbuffers(); glflush(); gldisable(gl_texture_2d); PLEASE TURN OVER

4 Page 4 The function settramat replaces the fourth column of a 4x4 transformation matrix stored in a vector of length 16 called mb1, with [xn yn ] T. The function setrotmat takes an angle (float) as second argument and an axis ID (int) as third argument (0=x,1=y,2=z) and creates a 4 x4 rotational matrix, stored in a vector of length 16. i. Assuming the angle (second argument) is 90 degrees, write down the corresponding 4x4 matrix. [4 marks] ii. Write down the body of the function setrotmat(float *m,float angle,int axis) using a switch/case statement to specify the code for each different axis. Since the code only needs to work in 2D, you can leave the case statements for two particular axes blank. You can make use of a function setidentity(m) to set your matrix m equal to the identity matrix. [10 marks] iii. After the positional coordinates of the bug are updated to their new positions xn and yn, respectively, the updated values are assigned to x0 and y0 in the function display. Why is this necessary? Could this be performed more optimally without using x0 and y0? If so, rewrite the code snippet. [4 marks] c. Without going into an in depth implementation of the code for the bug game, write down a function body illustrating a nested hierarchy of three rotations such as the one displayed in the game by the clusters of triangles, circles and squares, i.e. the teacup ride effect. Call the function idisplay() and use the glpushmatrix(), glpopmatrix(), gltranslatef(x,y,z) and glrotatef(a,x,y,z) functions. You can use variables such as poly[i] (i=0 for circles, 1 for triangles, 2 for squares) and a pseudo function such as display(poly[i])to display individual polygons. Use the global variables centre_angle, cluster_angle and poly_angle for the rotational angles at each respective level. You do not need to update these angles in this function as that happens somewhere else and angles are the same for each type of polygon (so no need to put some random effects in it). The x,y screen coordinates of the centres of each cluster are (-25.0,25.0) for the triangles; (0, ) for the squares and (25.0,25.0) for the circles. Hint: the radius (call it Radius1) of the clusters around the centre is sqrt(25^2+25^ ). The positions of the circles, triangles and squares is 30º, 150º and 270º respectively (note the 120º increment between angles). The radius within each cluster is 10.0 (call it Radius2). Within the cluster, the polygons are initially positioned (See Fig. 1(a)) at 90º, 210º and 330º (note the 120º increment between angles). Hint: Build your program from the middle outwards, i.e. start with the local transformations of the individual polygons, then in their clusters, then the clusters around the centre. [15 marks]

5 Page 5 2. a. In the context of rasterising outline fonts, describe what is meant by the terms: Hinting, Antialiasing and Sub-pixel rendering. b. In the context of the CIE colour spaces: [10 marks] i. Describe the CIE XYZ colour space. What was the motivation behind its development? What is the main difference between the shapes of the CIE RGB and CIE XYZ colour matching functions? [5 marks] ii. Given any XYZ triplet, how do you calculate its chromaticity coordinates xy? If an xy coordinate equals [ ], what is its corresponding z coordinate? [2 marks] iii. Draw the CIE xy diagram containing the shape of a typical display colour gamut. In the diagram, indicate the locations of the spectral curve, purple line and display primaries. [5 marks] c. You downloaded a.jpg image from the web. How would you change the saturation of this image? Your answer should include a clear description of all the steps of the algorithm. [9 marks] d. Describe the RGB, CMY and HSV colour spaces and their main applications. [9 marks] PLEASE TURN OVER

6 Page 6 3. a. We consider the mid-point algorithm for line drawing. In the lectures we have seen how to determine the E-NE pixels in the 0-45 degrees octant based on the mid-point criterion using a decision variable d. i. Write down the mid-point criterion (determine d) when considering the N- NE pixels in the degree octant. Use Figure 2 as a guide. Also write down the conditions (i.e. with respect to parameters a,b and m) for which the criterion is valid. [12 marks ] ii. What is the main advantage of the midpoint algorithm over the DDA algorithm? [3 marks ] iii. Briefly discuss anti-aliasing techniques for line drawing. [9 marks ] Figure 2. b. Imagine we start with a square at the origin as shown in Figure 3(a). We wish to derive the articulated geometry (some kind of robotic arm) as shown in Figure 3(b). Specify the 2D transformation matrices (in the right order) to arrive at this geometry by solely using three squares all starting in the origin as shown in Figure 1a. Do this in three steps, i.e. first for the gantry, then the first link, then for the second link, as seen in the lectures. [16 marks]

7 Page 7 Figure 3. PLEASE TURN OVER

8 Page 8 4. a. Consider the scan-line algorithm for the polygon in Figure 4. i. Show the relevant scan lines on an updated figure. Also indicate which points need to be lowered by drawing a dot underneath and label this new point with the primed label of the original point. [ 8 marks ] ii. Determine the initial bucket-sorted edge table using linked lists. [12 marks] Figure 4.

9 Page 9 b. The figure below shows a region with one line to be clipped. Illustrate how the Cohen-Sutherland clipping algorithm (programming code shown below) will clip this line using a step by step approach, i.e. by clearly referring to the programming code line numbers which are processed during program execution. Also make sure you mention the state of any variable that is altered when a particular line is processed. Update Figure 5 with the new points generated during the execution of the program. [20 marks] Figure 5. PLEASE TURN OVER

10 Page void ClipLine_Cohen_Sutherland(coord winmin, coord winmax, coord p0, coord p1){ 2. unsigned char code0,code1; 3. int done = FALSE, draw = FALSE; 4. float m; 5. while(!done){ 6. code0 = encode(p0,winmin,winmax); 7. code1 = encode(p1,winmin,winmax); 8. if(accept(code0,code1)){ /* Line is entirely inside clip-window */ 9. done = TRUE; 10. draw = TRUE; 11. else { 12. if(reject(code0,code1)) 13. done = TRUE; 14. else { 15. if(inside(code0)){ /* Init. Point inside clip-window => swap */ 16. swappts(&p0,&p1); 17. swapcodes(&code0,&code1); 18. if(p1.x!= p0.x){ /* No vertical line */ 19. m=((float)(p1->y-p0->y))/((float)(p1->xp0->x)); 20. if(code0 & LEFT_EDGE){ 21. p0.y += (winmin.x-p0.x)*m; 22. p0.x = winmin.x; 23. else if(code0 & RIGHT_EDGE){ 24. p0.y += (winmax.x-p0.x)*m; 25. p0.x = winmax.x; 26. else if(code0 & BOTTOM_EDGE){ 27. if(p1.x!= p0.x)/* None-vert.lines*/ 28. p0.x += (winmin.y-p0.y)/m; 29. p0.y = winmin.y; 30. else if(code0 TOP_EDGE){ 31. if(p1.x!= p0.x)/* None-vert.lines*/ 32. p0.x += (winmax.y-p0.y)/m; 33. p0.y = winmax.y; /* end_while */ 34. if(draw)line_dda_b(p0.x,p0.y,p1.x,p1.y); END OF PAPER

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

Module Contact: Dr Rudy Lapeer, CMP Copyright of the University of East Anglia Version 1

Module Contact: Dr Rudy Lapeer, CMP Copyright of the University of East Anglia Version 1 UNIVERSITY OF EAST ANGLIA School of Computing Sciences Main Series UG Examination 2014-15 GRAPHICS 1 CMP-5010B Time allowed: 2 hours Answer THREE questions. Notes are not permitted in this examination

More information

Module Contact: Dr Rudy Lapeer (CMP) Copyright of the University of East Anglia Version 1

Module Contact: Dr Rudy Lapeer (CMP) Copyright of the University of East Anglia Version 1 UNIVERSITY OF EAST ANGLIA School of Coputing Sciences Main Series UG Exaination 2016-17 GRAPHICS 1 CMP-5010B Tie allowed: 2 hours Answer THREE questions. Notes are not peritted in this exaination Do not

More information

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

CS1354 GRAPHICS AND MULTIMEDIA DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING QUESTION BANK SUB CODE / SUBJECT: CS1354 GRAPHICS AND MULTIMEDIA. DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING QUESTION BANK SUB CODE / SUBJECT: CS1354 GRAPHICS AND MULTIMEDIA YEAR / SEM: II / III Unit 1 OUTPUT PRIMITIVES 1. Define 2D rotation. 2. Write the 2D transformation

More information

EXAMINATIONS 2017 TRIMESTER 2

EXAMINATIONS 2017 TRIMESTER 2 EXAMINATIONS 2017 TRIMESTER 2 CGRA 151 INTRODUCTION TO COMPUTER GRAPHICS Time Allowed: TWO HOURS CLOSED BOOK Permitted materials: Silent non-programmable calculators or silent programmable calculators

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

CHETTINAD COLLEGE OF ENGINEERING & TECHNOLOGY CS2401 COMPUTER GRAPHICS QUESTION BANK

CHETTINAD COLLEGE OF ENGINEERING & TECHNOLOGY CS2401 COMPUTER GRAPHICS QUESTION BANK CHETTINAD COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING CS2401 COMPUTER GRAPHICS QUESTION BANK PART A UNIT I-2D PRIMITIVES 1. Define Computer graphics. 2. Define refresh

More information

CMSC 435/634: Introduction to Graphics

CMSC 435/634: Introduction to Graphics CMSC 435/634: Introduction to Graphics Midterm Exam October 9, 2002 Instructions: Clearly write your name on this sheet. Answer each problem in the space provided. If you need extra space, write on extra

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 PG Examination 2013-14 COMPUTER GAMES DEVELOPMENT CMPSME27 Time allowed: 2 hours Answer any THREE questions. (40 marks each) Notes are

More information

Institutionen för systemteknik

Institutionen för systemteknik Code: Day: Lokal: M7002E 19 March E1026 Institutionen för systemteknik Examination in: M7002E, Computer Graphics and Virtual Environments Number of sections: 7 Max. score: 100 (normally 60 is required

More information

CS2401 COMPUTER GRAPHICS ANNA UNIV QUESTION BANK

CS2401 COMPUTER GRAPHICS ANNA UNIV QUESTION BANK CS2401 Computer Graphics CS2401 COMPUTER GRAPHICS ANNA UNIV QUESTION BANK CS2401- COMPUTER GRAPHICS UNIT 1-2D PRIMITIVES 1. Define Computer Graphics. 2. Explain any 3 uses of computer graphics applications.

More information

The University of Calgary

The University of Calgary The University of Calgary Department of Computer Science Final Examination, Questions ENEL/CPSC 555 Computer Graphics Time: 2 Hours Closed Book, calculators are permitted. The questions carry equal weight.

More information

SRM INSTITUTE OF SCIENCE AND TECHNOLOGY

SRM INSTITUTE OF SCIENCE AND TECHNOLOGY SRM INSTITUTE OF SCIENCE AND TECHNOLOGY DEPARTMENT OF INFORMATION TECHNOLOGY QUESTION BANK SUB.NAME: COMPUTER GRAPHICS SUB.CODE: IT307 CLASS : III/IT UNIT-1 2-marks 1. What is the various applications

More information

VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur 603203. DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING Year & Semester : III Year, V Semester Section : CSE - 1 & 2 Subject Code : CS6504 Subject

More information

1 Some easy lines (2, 17) (10, 17) (18, 2) (18, 14) (1, 5) (8, 12) Check with a ruler. Are your lines straight?

1 Some easy lines (2, 17) (10, 17) (18, 2) (18, 14) (1, 5) (8, 12) Check with a ruler. Are your lines straight? 1 Some easy lines Computers draw images using pixels. Pixels are the tiny squares that make up the image you see on computer monitors. If you look carefully at a computer screen with a magnifying glass,

More information

Module Contact: Dr Geoff McKeown, CMP Copyright of the University of East Anglia Version 1

Module Contact: Dr Geoff McKeown, CMP Copyright of the University of East Anglia Version 1 UNIVERSITY OF EAST ANGLIA School of Computing Sciences Main Series UG Examination 2015-16 DATA STRUCTURES AND ALGORITHMS CMP-5014Y Time allowed: 3 hours Section A (Attempt any 4 questions: 60 marks) Section

More information

In today s lecture we ll have a look at: A simple technique The mid-point circle algorithm

In today s lecture we ll have a look at: A simple technique The mid-point circle algorithm Drawing Circles In today s lecture we ll have a look at: Circle drawing algorithms A simple technique The mid-point circle algorithm Polygon fill algorithms Summary raster drawing algorithms A Simple Circle

More information

CSC 240 Computer Graphics. Fall 2015 Smith College

CSC 240 Computer Graphics. Fall 2015 Smith College CSC 240 Computer Graphics Fall 2015 Smith College Outline: 11/9 Stacks revisited Shading (using normal vectors) Texture Mapping Final quiz If time: robot with two arms White background slides from Eitan

More information

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

Roll No. : Invigilator's Signature :.. GRAPHICS AND MULTIMEDIA. Time Allotted : 3 Hours Full Marks : 70 Name : Roll No. : Invigilator's Signature :.. CS/MCA/SEM-4/MCA-402/2012 2012 GRAPHICS AND MULTIMEDIA Time Allotted : 3 Hours Full Marks : 70 The figures in the margin indicate full marks. Candidates are

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

CMSC 435/634: Introduction to Graphics

CMSC 435/634: Introduction to Graphics CMSC 435/634: Introduction to Graphics Final Exam December 16, 2002 Instructions: Clearly write your name on this sheet. Answer each problem in the space provided. If you need extra space, write on extra

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

QUESTION 1 [10] 2 COS340-A October/November 2009

QUESTION 1 [10] 2 COS340-A October/November 2009 2 COS340-A QUESTION 1 [10] a) OpenGL uses z-buffering for hidden surface removal. Explain how the z-buffer algorithm works and give one advantage of using this method. (5) Answer: OpenGL uses a hidden-surface

More information

MODULE - 4. e-pg Pathshala

MODULE - 4. e-pg Pathshala e-pg Pathshala MODULE - 4 Subject : Computer Science Paper: Computer Graphics and Visualization Module: Midpoint Circle Drawing Procedure Module No: CS/CGV/4 Quadrant 1 e-text Before going into the Midpoint

More information

GeoGebra. 10 Lessons. maths.com. Gerrit Stols. For more info and downloads go to:

GeoGebra. 10 Lessons.   maths.com. Gerrit Stols. For more info and downloads go to: GeoGebra in 10 Lessons For more info and downloads go to: http://school maths.com Gerrit Stols Acknowledgements Download GeoGebra from http://www.geogebra.org GeoGebra is dynamic mathematics open source

More information

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

OXFORD ENGINEERING COLLEGE (NAAC Accredited with B Grade) DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING LIST OF QUESTIONS OXFORD ENGINEERING COLLEGE (NAAC Accredited with B Grade) DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING LIST OF QUESTIONS YEAR/SEM.: III/V STAFF NAME: T.ELANGOVAN SUBJECT NAME: Computer Graphics SUB. CODE:

More information

CS-321 Thursday 12 September 2002 Quiz (3 pts.) What is the purpose of a control grid in a cathode ray tube (CRT)?

CS-321 Thursday 12 September 2002 Quiz (3 pts.) What is the purpose of a control grid in a cathode ray tube (CRT)? Name CS-321 Thursday 12 September 2002 Quiz 1 1. (3 pts.) What is the purpose of a control grid in a cathode ray tube (CRT)? 2. (7 pts.) For the same resolution in pixels (for example, 640x480), why does

More information

BHARATHIDASAN ENGINEERING COLLEGE,NATTRAMPALLI

BHARATHIDASAN ENGINEERING COLLEGE,NATTRAMPALLI BHARATHIDASAN ENGINEERING COLLEGE,NATTRAMPALLI-635 854. 2017-2018 ODD SEMESTER -INFORMATION TECHNOLOGY IT6501 - GRAPHICS AND MULTIMEDIA- QUESTION BANK UNIT-I OUTPUT PRIMITIVES 1. What do you mean by output

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

End-Term Examination

End-Term Examination Paper Code: MCA-108 Paper ID : 44108 Second Semester [MCA] MAY-JUNE 2006 Q. 1 Describe the following in brief :- (3 x 5 = 15) (a) QUADRATIC SURFACES (b) RGB Color Models. (c) BSP Tree (d) Solid Modeling

More information

Precept 2 Aleksey Boyko February 18, 2011

Precept 2 Aleksey Boyko February 18, 2011 Precept 2 Aleksey Boyko February 18, 2011 Getting started Initialization Drawing Transformations Cameras Animation Input Keyboard Mouse Joystick? Textures Lights Programmable pipeline elements (shaders)

More information

We can use square dot paper to draw each view (top, front, and sides) of the three dimensional objects:

We can use square dot paper to draw each view (top, front, and sides) of the three dimensional objects: Unit Eight Geometry Name: 8.1 Sketching Views of Objects When a photo of an object is not available, the object may be drawn on triangular dot paper. This is called isometric paper. Isometric means equal

More information

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

(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. Code No: R05221201 Set No. 1 1. (a) List and explain the applications of Computer Graphics. (b) With a neat cross- sectional view explain the functioning of CRT devices. 2. (a) Write the modified version

More information

Spring 2009 Prof. Hyesoon Kim

Spring 2009 Prof. Hyesoon Kim Spring 2009 Prof. Hyesoon Kim Application Geometry Rasterizer CPU Each stage cane be also pipelined The slowest of the pipeline stage determines the rendering speed. Frames per second (fps) Executes on

More information

OpenGL/GLUT Intro. Week 1, Fri Jan 12

OpenGL/GLUT Intro. Week 1, Fri Jan 12 University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2007 Tamara Munzner OpenGL/GLUT Intro Week 1, Fri Jan 12 http://www.ugrad.cs.ubc.ca/~cs314/vjan2007 News Labs start next week Reminder:

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

Andrew Yenalavitch Homework 1 CSE Fall 2014

Andrew Yenalavitch Homework 1 CSE Fall 2014 Andrew Yenalavitch Homework 1 CSE 420 - Fall 2014 1.) ( 20 points ) In the class, we have discussed how to draw a line given by y = m x + b using Besenham's algorithm with m 1. Extend the algorithm to

More information

Introduction to OpenGL: Part 2

Introduction to OpenGL: Part 2 Introduction to OpenGL: Part 2 Introduction to OpenGL: Part 2 A more complex example recursive refinement Introduction to OpenGL: Part 2 A more complex example recursive refinement Can OpenGL draw continuous

More information

MET71 COMPUTER AIDED DESIGN

MET71 COMPUTER AIDED DESIGN UNIT - II BRESENHAM S ALGORITHM BRESENHAM S LINE ALGORITHM Bresenham s algorithm enables the selection of optimum raster locations to represent a straight line. In this algorithm either pixels along X

More information

EXAMINATIONS 2016 TRIMESTER 2

EXAMINATIONS 2016 TRIMESTER 2 EXAMINATIONS 2016 TRIMESTER 2 CGRA 151 INTRODUCTION TO COMPUTER GRAPHICS Time Allowed: TWO HOURS CLOSED BOOK Permitted materials: Silent non-programmable calculators or silent programmable calculators

More information

OpenGL Graphics System. 2D Graphics Primitives. Drawing 2D Graphics Primitives. 2D Graphics Primitives. Mathematical 2D Primitives.

OpenGL Graphics System. 2D Graphics Primitives. Drawing 2D Graphics Primitives. 2D Graphics Primitives. Mathematical 2D Primitives. D Graphics Primitives Eye sees Displays - CRT/LCD Frame buffer - Addressable pixel array (D) Graphics processor s main function is to map application model (D) by projection on to D primitives: points,

More information

EECE 478. Learning Objectives. Learning Objectives. Rasterization & Scenes. Rasterization. Compositing

EECE 478. Learning Objectives. Learning Objectives. Rasterization & Scenes. Rasterization. Compositing EECE 478 Rasterization & Scenes Rasterization Learning Objectives Be able to describe the complete graphics pipeline. Describe the process of rasterization for triangles and lines. Compositing Manipulate

More information

For more info and downloads go to: Gerrit Stols

For more info and downloads go to:   Gerrit Stols For more info and downloads go to: http://school-maths.com Gerrit Stols Acknowledgements GeoGebra is dynamic mathematics open source (free) software for learning and teaching mathematics in schools. It

More information

Module Contact: Dr Pierre Chardaire, CMP Copyright of the University of East Anglia Version 1

Module Contact: Dr Pierre Chardaire, CMP Copyright of the University of East Anglia Version 1 UNIVERSITY OF EAST ANGLIA School of Computing Sciences Main Series UG Examination 2014/15 INTRODUCTORY PROGRAMMING CMP-0005B Time allowed: 2 hours. Answer BOTH questions from section A and ONE question

More information

CS 4731: Computer Graphics Lecture 21: Raster Graphics: Drawing Lines. Emmanuel Agu

CS 4731: Computer Graphics Lecture 21: Raster Graphics: Drawing Lines. Emmanuel Agu CS 4731: Computer Graphics Lecture 21: Raster Graphics: Drawing Lines Emmanuel Agu 2D Graphics Pipeline Clipping Object World Coordinates Applying world window Object subset window to viewport mapping

More information

Assignment 1. Simple Graphics program using OpenGL

Assignment 1. Simple Graphics program using OpenGL Assignment 1 Simple Graphics program using OpenGL In this assignment we will use basic OpenGL functions to draw some basic graphical figures. Example: Consider following program to draw a point on screen.

More information

CS 130 Final. Fall 2015

CS 130 Final. Fall 2015 CS 130 Final Fall 2015 Name Student ID Signature You may not ask any questions during the test. If you believe that there is something wrong with a question, write down what you think the question is trying

More information

Solution Notes. COMP 151: Terms Test

Solution Notes. COMP 151: Terms Test Family Name:.............................. Other Names:............................. ID Number:............................... Signature.................................. Solution Notes COMP 151: Terms

More information

Viewing with Computers (OpenGL)

Viewing with Computers (OpenGL) We can now return to three-dimension?', graphics from a computer perspective. Because viewing in computer graphics is based on the synthetic-camera model, we should be able to construct any of the classical

More information

CHAPTER 1 Graphics Systems and Models 3

CHAPTER 1 Graphics Systems and Models 3 ?????? 1 CHAPTER 1 Graphics Systems and Models 3 1.1 Applications of Computer Graphics 4 1.1.1 Display of Information............. 4 1.1.2 Design.................... 5 1.1.3 Simulation and Animation...........

More information

CS 428: Fall Introduction to. Transformations in OpenGL + hierarchical modeling. Andrew Nealen, Rutgers, /21/2009 1

CS 428: Fall Introduction to. Transformations in OpenGL + hierarchical modeling. Andrew Nealen, Rutgers, /21/2009 1 CS 428: Fall 2009 Introduction to Computer Graphics Transformations in OpenGL + hierarchical modeling 9/21/2009 1 Review of affine transformations Use projective geometry staple of CG Euclidean (x,z) (x,y,z)

More information

Module Contact: Dr Gavin Cawley, CMP Copyright of the University of East Anglia Version 1

Module Contact: Dr Gavin Cawley, CMP Copyright of the University of East Anglia Version 1 UNIVERSITY OF EAST ANGLIA School of Computing Sciences Main Series UG Examination 2017-18 PROGRAMMING 1 CMP-4008Y Time allowed: 2 hours Answer FOUR questions. All questions carry equal weight. Notes are

More information

Line Drawing Week 6, Lecture 9

Line Drawing Week 6, Lecture 9 CS 536 Computer Graphics Line Drawing Week 6, Lecture 9 David Breen, William Regli and axim Peysakhov Department of Computer Science Drexel University Outline Line drawing Digital differential analyzer

More information

Do not turn over until you are told to do so by the Invigilator.

Do not turn over until you are told to do so by the Invigilator. UNIVERSITY OF EAST ANGLIA School of Mathematics UG End of Year Examination 2002-2003 PROGRAMMING FOR MATHEMATICIANS Time allowed: TWO hours Answer ALL FOUR questions in Section A Answer ONE Question from

More information

Midterm Exam Fundamentals of Computer Graphics (COMP 557) Thurs. Feb. 19, 2015 Professor Michael Langer

Midterm Exam Fundamentals of Computer Graphics (COMP 557) Thurs. Feb. 19, 2015 Professor Michael Langer Midterm Exam Fundamentals of Computer Graphics (COMP 557) Thurs. Feb. 19, 2015 Professor Michael Langer The exam consists of 10 questions. There are 2 points per question for a total of 20 points. You

More information

To Do. Computer Graphics (Fall 2008) Course Outline. Course Outline. Methodology for Lecture. Demo: Surreal (HW 3)

To Do. Computer Graphics (Fall 2008) Course Outline. Course Outline. Methodology for Lecture. Demo: Surreal (HW 3) Computer Graphics (Fall 2008) COMS 4160, Lecture 9: OpenGL 1 http://www.cs.columbia.edu/~cs4160 To Do Start thinking (now) about HW 3. Milestones are due soon. Course Course 3D Graphics Pipeline 3D Graphics

More information

Scene Graphs. CS4620/5620: Lecture 7. Announcements. HW 1 out. PA 1 will be out on Wed

Scene Graphs. CS4620/5620: Lecture 7. Announcements. HW 1 out. PA 1 will be out on Wed CS4620/5620: Lecture 7 Scene Graphs 1 Announcements HW 1 out PA 1 will be out on Wed Next week practicum will have an office hour type session on Open GL 2 Example Can represent drawing with flat list

More information

Computer Graphics : Bresenham Line Drawing Algorithm, Circle Drawing & Polygon Filling

Computer Graphics : Bresenham Line Drawing Algorithm, Circle Drawing & Polygon Filling Computer Graphics : Bresenham Line Drawing Algorithm, Circle Drawing & Polygon Filling Downloaded from :www.comp.dit.ie/bmacnamee/materials/graphics/006- Contents In today s lecture we ll have a loo at:

More information

CS475/675: Computer Graphics End-Semester Examination (Solutions), Fall 2016

CS475/675: Computer Graphics End-Semester Examination (Solutions), Fall 2016 CS475/675: Computer Graphics End-Semester Examination (Solutions), Fall 2016 This paper has 6 (six) pages and 10 (ten) questions, totalling 80 (eighty) points. No calculators, notes, books, phones, tablets,

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

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

0. Introduction: What is Computer Graphics? 1. Basics of scan conversion (line drawing) 2. Representing 2D curves CSC 418/2504: Computer Graphics Course web site (includes course information sheet): http://www.dgp.toronto.edu/~elf Instructor: Eugene Fiume Office: BA 5266 Phone: 416 978 5472 (not a reliable way) Email:

More information

Lecture 5 2D Transformation

Lecture 5 2D Transformation Lecture 5 2D Transformation What is a transformation? In computer graphics an object can be transformed according to position, orientation and size. Exactly what it says - an operation that transforms

More information

Module Contact: Dr Geoff McKeown, CMP Copyright of the University of East Anglia Version 1

Module Contact: Dr Geoff McKeown, CMP Copyright of the University of East Anglia Version 1 UNIVERSITY OF EAST ANGLIA School of Computing Sciences Main Series UG Examination 2013-14 PROGRAMMING FOR NON-SPECIALISTS CMPC2X02 Time allowed: 2 hours Section A (Attempt all questions: 80 marks) Section

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

Assignment #6 2D Vector Field Visualization Arrow Plot and LIC

Assignment #6 2D Vector Field Visualization Arrow Plot and LIC Assignment #6 2D Vector Field Visualization Arrow Plot and LIC Due Oct.15th before midnight Goal: In this assignment, you will be asked to implement two visualization techniques for 2D steady (time independent)

More information

Lecture 5b. Transformation

Lecture 5b. Transformation Lecture 5b Transformation Refresher Transformation matrices [4 x 4]: the fourth coordinate is homogenous coordinate. Rotation Transformation: Axis of rotation must through origin (0,0,0). If not, translation

More information

Generating Vectors Overview

Generating Vectors Overview Generating Vectors Overview Vectors are mathematically defined shapes consisting of a series of points (nodes), which are connected by lines, arcs or curves (spans) to form the overall shape. Vectors can

More information

Introduction to OpenGL

Introduction to OpenGL Introduction to OpenGL Banafsheh Azari http://www.uni-weimar.de/cms/medien/cg.html What You ll See Today What is OpenGL? Related Libraries OpenGL Command Syntax B. Azari http://www.uni-weimar.de/cms/medien/cg.html

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

Tópicos de Computação Gráfica Topics in Computer Graphics 10509: Doutoramento em Engenharia Informática. Chap. 2 Rasterization.

Tópicos de Computação Gráfica Topics in Computer Graphics 10509: Doutoramento em Engenharia Informática. Chap. 2 Rasterization. Tópicos de Computação Gráfica Topics in Computer Graphics 10509: Doutoramento em Engenharia Informática Chap. 2 Rasterization Rasterization Outline : Raster display technology. Basic concepts: pixel, resolution,

More information

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

COMPUTER GRAPHICS, MULTIMEDIA AND ANIMATION, Second Edition (with CD-ROM) Malay K. Pakhira Computer Graphics, Multimedia and Animation SECOND EDITION Malay K. Pakhira Assistant Professor Department of Computer Science and Engineering Kalyani Government Engineering College Kalyani New Delhi-110001

More information

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

THE AUSTRALIAN NATIONAL UNIVERSITY Final Examinations(Semester 2) COMP4610/COMP6461 (Computer Graphics) Final Exam THE AUSTRALIAN NATIONAL UNIVERSITY Final Examinations(Semester 2) 2009 COMP4610/COMP6461 (Computer Graphics) Final Exam Writing Period: 3 hours duration Study Period: 15 minutes duration - you may read

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

QUESTION BANK 10CS65 : COMPUTER GRAPHICS AND VISUALIZATION

QUESTION BANK 10CS65 : COMPUTER GRAPHICS AND VISUALIZATION QUESTION BANK 10CS65 : COMPUTER GRAPHICS AND VISUALIZATION INTRODUCTION OBJECTIVE: This chapter deals the applications of computer graphics and overview of graphics systems and imaging. UNIT I 1 With clear

More information

Scan Conversion. Drawing Lines Drawing Circles

Scan Conversion. Drawing Lines Drawing Circles Scan Conversion Drawing Lines Drawing Circles 1 How to Draw This? 2 Start From Simple How to draw a line: y(x) = mx + b? 3 Scan Conversion, a.k.a. Rasterization Ideal Picture Raster Representation Scan

More information

Module 2 Test Study Guide. Type of Transformation (translation, reflection, rotation, or none-of-theabove). Be as specific as possible.

Module 2 Test Study Guide. Type of Transformation (translation, reflection, rotation, or none-of-theabove). Be as specific as possible. Module 2 Test Study Guide CONCEPTS TO KNOW: Transformation (types) Rigid v. Non-Rigid Motion Coordinate Notation Vector Terminology Pre-Image v. Image Vertex Prime Notation Equation of a Line Lines of

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

Spring 2011 Prof. Hyesoon Kim

Spring 2011 Prof. Hyesoon Kim Spring 2011 Prof. Hyesoon Kim Application Geometry Rasterizer CPU Each stage cane be also pipelined The slowest of the pipeline stage determines the rendering speed. Frames per second (fps) Executes on

More information

Points and lines. x x 1 + y 1. y = mx + b

Points and lines. x x 1 + y 1. y = mx + b Points and lines Point is the fundamental element of the picture representation. It is nothing but the position in a plan defined as either pairs or triplets of number depending on whether the data are

More information

Drawtool. Toby Jaffey December 2, Drawtool What is it? What can I do with it? Data format...

Drawtool. Toby Jaffey December 2, Drawtool What is it? What can I do with it? Data format... Drawtool Toby Jaffey toby@earth.li December 2, 1999 Contents 1 Drawtool 2 1.1 What is it?............................................ 2 1.2 What can I do with it?......................................

More information

Output Primitives Lecture: 3. Lecture 3. Output Primitives. Assuming we have a raster display, a picture is completely specified by:

Output Primitives Lecture: 3. Lecture 3. Output Primitives. Assuming we have a raster display, a picture is completely specified by: Lecture 3 Output Primitives Assuming we have a raster display, a picture is completely specified by: - A set of intensities for the pixel positions in the display. - A set of complex objects, such as trees

More information

CSCI 4620/8626. Coordinate Reference Frames

CSCI 4620/8626. Coordinate Reference Frames CSCI 4620/8626 Computer Graphics Graphics Output Primitives Last update: 2014-02-03 Coordinate Reference Frames To describe a picture, the world-coordinate reference frame (2D or 3D) must be selected.

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

Math 9: Chapter Review Assignment

Math 9: Chapter Review Assignment Class: Date: Math 9: Chapter 7.5-7.7 Review Assignment Multiple Choice Identify the choice that best completes the statement or answers the question. 1. Which shapes have at least 2 lines of symmetry?

More information

From Vertices to Fragments: Rasterization. Reading Assignment: Chapter 7. Special memory where pixel colors are stored.

From Vertices to Fragments: Rasterization. Reading Assignment: Chapter 7. Special memory where pixel colors are stored. From Vertices to Fragments: Rasterization Reading Assignment: Chapter 7 Frame Buffer Special memory where pixel colors are stored. System Bus CPU Main Memory Graphics Card -- Graphics Processing Unit (GPU)

More information

Output Primitives. Dr. S.M. Malaek. Assistant: M. Younesi

Output Primitives. Dr. S.M. Malaek. Assistant: M. Younesi Output Primitives Dr. S.M. Malaek Assistant: M. Younesi Output Primitives Output Primitives: Basic geometric structures (points, straight line segment, circles and other conic sections, quadric surfaces,

More information

The Rendering Pipeline (1)

The Rendering Pipeline (1) The Rendering Pipeline (1) Alessandro Martinelli alessandro.martinelli@unipv.it 30 settembre 2014 The Rendering Pipeline (1) Rendering Architecture First Rendering Pipeline Second Pipeline: Illumination

More information

Answer BOTH questions from Section A and ONE question from Section B.

Answer BOTH questions from Section A and ONE question from Section B. UNIVERSITY OF EAST ANGLIA School of Computing Sciences Main Series UG Examination 2013/14 INTRODUCTORY PROGRAMMING CMP-0005B Time allowed: 2 hours Answer BOTH questions from Section A and ONE question

More information

Texture Mapping. Texture (images) lecture 16. Texture mapping Aliasing (and anti-aliasing) Adding texture improves realism.

Texture Mapping. Texture (images) lecture 16. Texture mapping Aliasing (and anti-aliasing) Adding texture improves realism. lecture 16 Texture mapping Aliasing (and anti-aliasing) Texture (images) Texture Mapping Q: Why do we need texture mapping? A: Because objects look fake and boring without it. Adding texture improves realism.

More information

lecture 16 Texture mapping Aliasing (and anti-aliasing)

lecture 16 Texture mapping Aliasing (and anti-aliasing) lecture 16 Texture mapping Aliasing (and anti-aliasing) Texture (images) Texture Mapping Q: Why do we need texture mapping? A: Because objects look fake and boring without it. Adding texture improves realism.

More information

Efficient Plotting Algorithm

Efficient Plotting Algorithm Efficient Plotting Algorithm Sushant Ipte 1, Riddhi Agarwal 1, Murtuza Barodawala 1, Ravindra Gupta 1, Prof. Shiburaj Pappu 1 Computer Department, Rizvi College of Engineering, Mumbai, Maharashtra, India

More information

Rasterization and Graphics Hardware. Not just about fancy 3D! Rendering/Rasterization. The simplest case: Points. When do we care?

Rasterization and Graphics Hardware. Not just about fancy 3D! Rendering/Rasterization. The simplest case: Points. When do we care? Where does a picture come from? Rasterization and Graphics Hardware CS559 Course Notes Not for Projection November 2007, Mike Gleicher Result: image (raster) Input 2D/3D model of the world Rendering term

More information

Virtual Environments

Virtual Environments ELG 524 Virtual Environments Jean-Christian Delannoy viewing in 3D world coordinates / geometric modeling culling lighting virtualized reality collision detection collision response interactive forces

More information

From Ver(ces to Fragments: Rasteriza(on

From Ver(ces to Fragments: Rasteriza(on From Ver(ces to Fragments: Rasteriza(on From Ver(ces to Fragments 3D vertices vertex shader rasterizer fragment shader final pixels 2D screen fragments l determine fragments to be covered l interpolate

More information

COMP30019 Graphics and Interaction Scan Converting Polygons and Lines

COMP30019 Graphics and Interaction Scan Converting Polygons and Lines COMP30019 Graphics and Interaction Scan Converting Polygons and Lines Department of Computer Science and Software Engineering The Lecture outline Introduction Scan conversion Scan-line algorithm Edge coherence

More information

Module Contact: Dr Pierre Chardaire, CMP Copyright of the University of East Anglia Version 1

Module Contact: Dr Pierre Chardaire, CMP Copyright of the University of East Anglia Version 1 UNIVERSITY OF EAST ANGLIA School of Computing Sciences Main Series UG Examination 2015/16 INTRODUCTORY PROGRAMMING CMP-0005B Time allowed: 2 hours. Answer BOTH questions from section A and ONE question

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

Chapter 2: Transformations. Chapter 2 Transformations Page 1

Chapter 2: Transformations. Chapter 2 Transformations Page 1 Chapter 2: Transformations Chapter 2 Transformations Page 1 Unit 2: Vocabulary 1) transformation 2) pre-image 3) image 4) map(ping) 5) rigid motion (isometry) 6) orientation 7) line reflection 8) line

More information

Example Examination 2IV

Example Examination 2IV Example Examination IV60-04071 (translated version IV10 4 july 01, 14:00-17:00) This examination consist of four questions with in total 16 subquestion. Each subquestion weighs equally. In all cases: EXPLAIN

More information

CS 543 Lecture 1 (Part 3) Prof Emmanuel Agu. Computer Science Dept. Worcester Polytechnic Institute (WPI)

CS 543 Lecture 1 (Part 3) Prof Emmanuel Agu. Computer Science Dept. Worcester Polytechnic Institute (WPI) Computer Graphics CS 543 Lecture 1 (Part 3) Prof Emmanuel Agu Computer Science Dept. Worcester Polytechnic Institute (WPI) Recall: OpenGL Skeleton void main(int argc, char** argv){ // First initialize

More information