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

Size: px
Start display at page:

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

Transcription

1 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 if 105 bits can be transferred per second? How long would it take to load a 32-bit-per-pixel frame buffer with a resolution of 1680 by 1050 using this same transfer rate? The number of bits to be transferred is = At a transfer rate of 105 bits per second it will take / 105 or about seconds (~ 1219 minutes or 20.3 hours) to load the entire frame buffer. The 32 bit-per-pixel frame buffer has = bits. At the same transfer rate, it would take / 105 or seconds (~ 8960 minutes or hours). Obviously 105 bits per second is ridiculously slow, and video transfer rates for modern systems usually have bandwidths reported in gigabits per second. 2. Suppose we have a video monitor with a display area that measures 12 inches across and 9.6 inches high. If the resolution is 1280 by 1024 and the aspect ratio is 1, what is the diameter of each screen point? The number of horizontal pixels per inch is 1280 / 12 = The number of vertical pixels per inch is 1024 / 9.6 = , so the width and height of each pixel is the same, as expected for an aspect ratio of 1. The diameter of each screen point is thus 1 / = inches. 3. Suppose you want to draw a square using OpenGL. The coordinates of the square are (1,1), (1,2), (2,1), and (2,2). There are at least four differentglbegin function invocations and the correspondingglvertex* function calls that will achieve the drawing of this square. One of them is this: glbegin(gl_quads); glvertex2i(1,1); glvertex2i(1,2); glvertex2i(2,2); glvertex2i(2,1); glend(); Give three other code sequences (fromglbegin throughglend) that will draw the square. Which of these will draw a filled square? Assume the first approach is that shown above. It uses to draw a quadrilateral given four vertices, which in this case, are the four corners of the square. The second approach is perhaps the most primitive. It usesgl_lines to draw a single line between each pair of vertices:

2 glbegin(gl_lines); glvertex2i(1,1); /* FIRST LINE (1,1) to (1,2) */ glvertex2i(1,2); glvertex2i(1,2); /* SECOND LINE (1,2) to (2,2) */ glvertex2i(2,2); glvertex2i(2,2); /* THIRD LINE (2,2) to (2,1) */ glvertex2i(2,1); glvertex2i(2,1); /* FOURTH LINE (2,1) to (1,1) */ glvertex2i(1,1); glend(); The third approach is similar, but usesgl_line_strip; it connects each vertex to the next: glbegin(gl_line_strip); glvertex2i(1,1); glvertex2i(1,2); /* FIRST LINE (1,1) to (1,2) */ glvertex2i(2,2); /* SECOND LINE (1,2) to (2,2) */ glvertex2i(2,1); /* THIRD LINE (2,2) to (2,1) */ glvertex2i(1,1); /* FOURTH LINE (2,1) to (1,1) */ glend(); Finally, the fourth approach usesgl_line_loop and connects each vertex to the next, and the last vertex to the first: glbegin(gl_line_loop); glvertex2i(1,1); glvertex2i(1,2); /* FIRST LINE (1,1) to (1,2) */ glvertex2i(2,2); /* SECOND LINE (1,2) to (2,2) */ glvertex2i(2,1); /* THIRD LINE (2,2) to (2,1) */ /* FOURTH LINE (2,1) to (1,1) */ glend() Only the first of these approaches will yield a filled square. 4. Briefly explain the relationship between the windowing system provided by something like Microsoft Windows or Apple OS X, the drawing produced by calls to the OpenGL library, and GLUT. OpenGL functions and data structures are intended to be machine (and operating system) independent. Operating systems are very much machine dependent, as one of their primary goals is to provide management of the resources of the computer system in particular, the hardware resources, including the displays, keyboard, mouse, and other hardware used to construct graphics applications. GLUT the OpenGL Utility Toolkit is a set of functions that may be used to allow machine-independent programs using OpenGL to utilize the machine

3 dependent features of a particular system. GLUT provides a set of functions that provide a framework for developing graphics applications, and these functions are implemented appropriately for a variety of different systems. 5. Explain the purpose ofglutdisplayfunc and the function provided as its argument. Why is such a callback function required? In general, what is the purpose of a callback function (as provided by GLUT)? glutdisplayfunc is used to register the function named in its argument as the callback function to be invoked when it is determined that the image in the associated window needs to be redrawn (because of a variety of reasons for example, it was just created, or another window that was covering it was moved or closed). The named function is responsible for redisplaying the content of the associated window. In general, the purpose of a callback function is to perform appropriate actions when a triggering event is detected by GLUT. For example, there may be callback functions to deal with keyboard input, mouse movement, mouse key actions, timer events, and so forth. 6. There are two basic OpenGL approaches to specifying the vertices associated with drawing objects: (1) explicitly giving their values as arguments to functions like glvertex2i and (2) specifying a collection of vertices in a vertex array. Briefly describe the difference between these approaches. Then indicate a potential benefit of using vertex arrays. The first approach (i.e. using something glvertex2i) requires that the x, y (and perhaps z) coordinate values of every vertex be explicitly specified as a parameter to a function call, and that there be a separate function call for every vertex. So to specify a scene with 1000 vertices will require 1000 function calls. The second approach (specifying coordinate information for all vertices in an array) reduces the number of functions calls, perhaps significantly. A scene with 1000 vertices now requires only a single function call to specify the vertices to OpenGL. One major benefit of using the vertex array approach is evidenced when we use a client-server system, with a separate client machine (runs the main program and retains the data) and server machine (generates commands and displays the picture). In these systems, the vertex array approach may provide some economy of scale in the communication of the data from the client to the server. 7. What happens when OpenGL draws two filled objects (like triangles) so that one overlaps the other? Explain how this behavior can be controlled. In the simplest case, the pixels in the overlapping region will be filled with the color information for the second object that is, the second object hides part of the first object. OpenGL provides a blending mechanism that allows the color of such regions to be a function of the color of the overlapping objects. In particular, the resulting color is a weighted sum of the colors of the source the new object being drawn, and the destination the object that would have been hidden complete if blending was not employed. OpenGL functions are provided to enable or

4 disable the blending mechanism, to specify weights associated with object colors, and to specify how these weights are to be used in determining blended colors. 8. Bresenham s algorithm for drawing a line with a slope m having an absolute value less than 1 (that is, m < 1.0) is given in the text on pages and is also displayed below. Assume we wanted to modify the algorithm so it performed line stippling in the same way as if gllinestipple had been invoked. Modify the function so it accepts two additional parameters,repeatfactor andpattern (the same as those used withgllinestipple), and so it would display the appropriately-stippled line. You do not need to actually compile the code; just provide a display of the modified code. The original code, with modifications, is shown below. Here s a quote from the description of gllinestipple: Line stippling masks out certain fragments produced by rasterization; those fragments will not be drawn. The masking is achieved by using three parameters: the 16-bit line stipple pattern pattern, the repeat countfactor, and an integer stipple counters. Counter s is reset to 0 wheneverglbegin is called and before each line segment of a glbegin(gl_lines) /glend sequence is generated. It is incremented after each fragment of a unit width aliased line segment is generated or after each i fragments of an i width line segment are generated. The i fragments with countsare masked out if s pattern bit % 16 0 factor Otherwise these fragments are sent to the frame buffer. Bit 0 of pattern is the least significant bit. Of course, we are only concerned with generating a single line segment, so we can assume s the counter of bits generated is initially zero and is incremented after each bit is generated, whether or not it is added to the frame buffer or not. The modifications to the original code are marked with XXX comment lines. Of course, the entire function namedusethisbit was added. #include <stdlib.h> #include <math.h> /* Bresenham line-drawing procedure for m < 1.0. */ /* Modified (see XXX comments) to do stippling. */ /* XXX Return 1 if bit s should be set in a line that */ /* XXX is being drawn with a specified pattern and */ /* XXX repeat factor. The bit number (0, 1,...) is */ /* XXX in the integer pointed to by s; and it is */ /* XXX incremented each time this function is called. */

5 /* XXX This could be written more briefly, but is not */ /* XXX for pedantic reasons. */ int usethisbit(int repeatfactor, int pattern, int *s)) { int pbitnum; /* which bit of the pattern to use */ int pbit; /* a particular bit */ pbitnum = (*s / repeatfactor) % 16; /* which bit position? */ pbit = (pattern >> pbitnum) & 1; /* extract the bit */ *s = *s + 1; /* increment bit count */ return pbit; /* return the pattern bit */ void linebres (int x0, int y0, int xend, int yend, int repeatfactor, int pattern) /* XXX added parameters */ { int dx = fabs (xend - x0), dy = fabs(yend - y0); int p = 2 * dy - dx; int twody = 2 * dy, twodyminusdx = 2 * (dy - dx); int x, y; int s = 0; /* XXX stipple counter */ /* Determine which endpoint to use as start position. */ if (x0 > xend) { x = xend; y = yend; xend = x0; else { x = x0; y = y0; if (usethisbit(repeatfactor, pattern, &s)) /* XXX conditional */ setpixel (x, y); while (x < xend) { x++; if (p < 0) p += twody; else { y++; p += twodyminusdx; if (usethisbit(repeatfactor, pattern, &s)) /* XXX conditional */ setpixel (x, y);

6 9. What is meant by the term anti-aliasing? Briefly describe a few techniques that could be used to achieve this. We realize when we draw a line or a curve on a display device particularly a raster device that we re really just turning on a set of pixels to approximate the appearance of the line or curve. Simplistic approaches to drawing can result in images that are somewhat distorted due to the fact that we don t turn on enough pixels (because the pixels are too large) to realistically display the object. Recognizing this problem, graphics systems often include facilities for reducing this distortion (which is called aliasing ), and that s the purpose of anti-aliasing techniques. A fundamental theorem in communication states that if we take periodic samples of a signal at a rate at least twice as fast as the highest frequency that appears in the signal, then we can reconstitute the original signal from the samples. This affects us in drawing on a raster device, because the number of samples we take of a line (or other curve) are limited by the resolution of the device. For example, a line with an angle of 0, 45, or 90 degrees to the x axis can be drawn with exact samples. But if the angle is not one of those, then some of our samples will be incorrect. One simple way to deal with aliasing is to draw more pixels, and this can be achieved if the video display hardware can produce a higher-resolution image. Another approach that could be used (again if the hardware supports it) is to change the intensity of the pixels to suggest the accuracy of the pixel placement. More precisely-placed pixels can have greater illumination, which pixels that are illuminated just to suggest continuity, but are really incorrectly placed (according to the sample data) can be less strongly illuminated. Still another technique might perform pixel placement computation assuming the resolution of the display is higher than it is in reality. Then the results of this computation can be used to determine the appropriate intensity for the pixels that we actually have on the display. 10. What are the two major techniques used with OpenGL to specify the color of objects? The most obvious approach is to specify the red, green, and blue (and perhaps alpha) components (RGBA) for each color as separate parameters. The other approach is to prepare an array, say C, containing the specification of the RGBA values for each color of interest in a scene, and then specify the index in C of the desired color for each object (e.g. line or filled polygon). For scenes with large numbers of objects, the second approach is likely to be more efficient. 11. What are the coordinates of a line from (1,1) to (3,3) after it has been rotated 45 degrees clockwise? What would the coordinates be if it had been rotated 90 degrees counterclockwise instead? In both cases, assume the rotation is about the origin. After a clockwise rotation by 45 degrees the vertices will be about (1.414,0) and (4.243,0). If we rotate the line 90 degrees counterclockwise about the origin, the vertices will be (-1,1) and (- 3,3).

7 12. Determine the coordinates of the line in the previous question, but assume the rotations are about the point (2,2). To achieve this result, we do the same rotations, but precede each by a translation of (2,2) to (0,0) and follow each by a translation of (0,0) back to (2,2). The 45 degree clockwise rotation yields vertices at about (0.586,2) and (3.414,2). The 90 degree counterclockwise rotation yields vertices at (3,1) and (1,3). 13. Translation of an object by ( x, y) is relatively simple: add x to the x component of each vertex, and add y to the y component of each vertex. In general, this isn t the way OpenGL (and other graphics libraries) usually implement translation. What would you usually do to implement translation? Consider only two-dimensional drawings. Although the effect is the same, two-dimensional translations in OpenGL are usually represented by a 3 3 matrix with the following structure: 1 0 x 0 1 y The value of this approach over explicit addition of the translation values to the components of each vertex is that the translation matrix can be combined (multiplied) with all the other transformations (additional translations, rotations, scalings, etc.) so all of these transformations can be applied to all of the vertices with a single matrix multiplication. 14. Explain the essential differences between a clipping window and a viewport. A clipping window, usually a rectangular region with sides parallel to the coordinate system axes, identifies those points and part of lines, polygons, and other objects that are to be retained from a scene description; the remainder of the scene is culled or clipped and not displayed. A viewport, also usually a rectangular region with sides parallel to the display system boundaries, identifies the region where a clipped scene will be displayed. It is common for the aspect ratio of the clipping window to match the aspect ratio of the viewport, but this is not required. In summary, the clipping window identifies what is to be displayed, and the viewport identifies where it is to be displayed. 15. Consider the three clipping algorithms (for straight lines and a rectangular clipping window) Cohen-Sutherland, Liang-Barsky, and Nicholl-Lee-Nicholl. These algorithms are all similar in one respect, and they also differ from each other in one significant way. What is the similarity, and what is the difference. Each of these algorithms classifies the endpoints of lines, or partially-clipped lines, as being in one or more regions. Cohen-Sutherland and Liang-Barksy each define 9 regions one inside the clipping window and 8 outside (left, right, top, bottom, left top, left bottom, right top, and right bottom). Nicholl-Lee-Nicholl, on the other hand, identifies regions by extending lines from one endpoint P 0 of a line segment through the four corners of the clipping window, and then

8 identifies which of the regions contains the line from P 0 to P end. Each algorithm then considers the intersection of the line being clipped as it moves from region to region. One major difference between these algorithms is the number of intersections they need to consider. In general, Cohen-Sutherland will consider more intersections than Liang-Barsky, and Liang-Barksy will consider more intersections than Nicholl-Lee-Nicholl. Another different between the first two and Nicholl-Lee-Nicholl is that Cohen-Sutherland and Liang-Barsky can easily be extended to three dimension. Nicholl-Lee-Nicholl cannot be extended as easily. 16. Consider the rectangular clipping window with (1,1) as its lower left corner and (3,3) as its upper right corner. What are the coordinates of the line from (0.5,1.5) to (2,4) when it is clipped? What are the coordinates of the line from (1.5,3.5) to (4,0) when it is clipped? The line from (0.5,1.5) to (2,4) will intersect the left edge of the clipping window at (1,7/3). It will intersect the top edge of the clipping window at (1.4,3). The line from (1.5,3.5) to (4,0) will intersect the top edge of the clipping window at (13/7,3), and the right edge of the clipping window at (3,1.4). 17. The Sutherland-Hodgman polygon-clipping algorithm works in stages. What is the difference between the stages? What is a potentially significant advantage of this algorithm over one that does not work in stages? Sutherland-Hodgman passes the initial list of pairs of vertices to the first clipping stage (or clipper), where each of the segments formed by the vertices is examined to determine it intersection with a specified clipping window boundary (e.g. the left edge). The vertices for the clipped segments from the first clipper are passed to the second clipper, which does the same task, except with respect to a different clipping window boundary. The other clippers handle the other clipping window boundaries. A significant advantage of this approach over one that doesn t work in stages is that the individual stages can be run in parallel on different processors. That may significantly reduce the elapsed time to clip filled polygons. 18. What makes line-clipping algorithms (like Cohen-Sutherland), by themselves, generally unsuitable for clipping the boundary lines, and thus the areas, of filled regions? Applying a line-clipping algorithm to the individual polygon edges will not, in general, produce a closed polygon (or polygons). Without a closed region, it is impossible to identify the area to be filled. So an algorithm that clips a filled polygon may need to be able to add additional new line segments that is, segments that were not part of the original polygon to create closed polygons.

9 19. Text clipping can be done using three obvious methods. What are these? (1) All the text in string can be considered as a single object. Either the entire object (string) fits (that is, is within the clipping window) or not. If it doesn t entirely fit, the entire string is clipped. (2) Each of the characters can be considered as a single object. If an entire character doesn t fit in the clipping window, it is clipped. In this approach, an integral number of characters will appear. (3) Finally, each character can be considered to be a set of lines or polygons, and the usual line/polygon clipping algorithms can be applied. With this method, part (or parts) of individual characters may appear or be clipped. 20. Assume we are clipping the components of individual characters. That is, if a character s boundary intersects with the clipping region boundary, then part of the character will be clipped and not be included in the clipping window. Which character type, outline or bitmapped, is likely to be more difficult to clip? Bitmapped characters are likely to be easy to clip: we apply the basic point clipping algorithm to each of the pixels in the bitmap representation of the character. Recall that point clipping just checks the x and y coordinates of a point to determine if it is entirely inside the clipping window (in which case it is kept) or not (in which case it is clipped). With outline characters, we basically are given a set of scaled polygons, each of which must be clipped using something like Sutherland-Hodgman; this will almost certainly be more computationally expensive that point clipping.

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

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

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

Rasterization: Geometric Primitives

Rasterization: Geometric Primitives Rasterization: Geometric Primitives Outline Rasterizing lines Rasterizing polygons 1 Rasterization: What is it? How to go from real numbers of geometric primitives vertices to integer coordinates of pixels

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

CSCI 4620/8626. Primitives and Attributes

CSCI 4620/8626. Primitives and Attributes CSCI 4620/8626 Computer Graphics Attributes of Graphics Primitives (Chapter 5) Last update: 2016-02-23 Primitives and Attributes The graphics primitives we ve seen so far are fundamental shapes, like lines,

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

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

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

Rasterization, or What is glbegin(gl_lines) really doing?

Rasterization, or What is glbegin(gl_lines) really doing? Rasterization, or What is glbegin(gl_lines) really doing? Course web page: http://goo.gl/eb3aa February 23, 2012 Lecture 4 Outline Rasterizing lines DDA/parametric algorithm Midpoint/Bresenham s algorithm

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

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

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

Computer Graphics. Attributes of Graphics Primitives. Somsak Walairacht, Computer Engineering, KMITL 1

Computer Graphics. Attributes of Graphics Primitives. Somsak Walairacht, Computer Engineering, KMITL 1 Computer Graphics Chapter 4 Attributes of Graphics Primitives Somsak Walairacht, Computer Engineering, KMITL 1 Outline OpenGL State Variables Point Attributes t Line Attributes Fill-Area Attributes Scan-Line

More information

Computer Graphics. Chapter 4 Attributes of Graphics Primitives. Somsak Walairacht, Computer Engineering, KMITL 1

Computer Graphics. Chapter 4 Attributes of Graphics Primitives. Somsak Walairacht, Computer Engineering, KMITL 1 Computer Graphics Chapter 4 Attributes of Graphics Primitives Somsak Walairacht, Computer Engineering, KMITL 1 Outline OpenGL State Variables Point Attributes Line Attributes Fill-Area Attributes Scan-Line

More information

CSCI 4620/8626. The 2D Viewing Pipeline

CSCI 4620/8626. The 2D Viewing Pipeline CSCI 4620/8626 Computer Graphics Two-Dimensional Viewing (Chapter 8) Last update: 2016-03-3 The 2D Viewing Pipeline Given a 2D scene, we select the part of it that we wish to see (render, display) using

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

Line Drawing. Foundations of Computer Graphics Torsten Möller

Line Drawing. Foundations of Computer Graphics Torsten Möller Line Drawing Foundations of Computer Graphics Torsten Möller Rendering Pipeline Hardware Modelling Transform Visibility Illumination + Shading Perception, Interaction Color Texture/ Realism Reading Angel

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

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

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

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

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

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

UNIT -8 IMPLEMENTATION

UNIT -8 IMPLEMENTATION UNIT -8 IMPLEMENTATION 1. Discuss the Bresenham s rasterization algorithm. How is it advantageous when compared to other existing methods? Describe. (Jun2012) 10M Ans: Consider drawing a line on a raster

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

Overview of Computer Graphics

Overview of Computer Graphics Application of Computer Graphics UNIT- 1 Overview of Computer Graphics Computer-Aided Design for engineering and architectural systems etc. Objects maybe displayed in a wireframe outline form. Multi-window

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

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

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

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

Graphics Programming

Graphics Programming Graphics Programming 3 rd Week, 2011 OpenGL API (1) API (application programming interface) Interface between an application program and a graphics system Application Program OpenGL API Graphics Library

More information

Rendering approaches. 1.image-oriented. 2.object-oriented. foreach pixel... 3D rendering pipeline. foreach object...

Rendering approaches. 1.image-oriented. 2.object-oriented. foreach pixel... 3D rendering pipeline. foreach object... Rendering approaches 1.image-oriented foreach pixel... 2.object-oriented foreach object... geometry 3D rendering pipeline image 3D graphics pipeline Vertices Vertex processor Clipper and primitive assembler

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

CSCI 4620/8626. Computer Graphics Attributes of Graphics Primitives (Chapter 5)

CSCI 4620/8626. Computer Graphics Attributes of Graphics Primitives (Chapter 5) CSCI 4620/8626 Computer Graphics Attributes of Graphics Primitives (Chapter 5) Last update: 2015-03-02 Non-Fill Methods While polygons can be filled (with patterns or colors), they can also be displayed

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

E.Order of Operations

E.Order of Operations Appendix E E.Order of Operations This book describes all the performed between initial specification of vertices and final writing of fragments into the framebuffer. The chapters of this book are arranged

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

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

Lesson 1. Unit 2 Practice Problems. Problem 2. Problem 1. Solution 1, 4, 5. Solution. Problem 3

Lesson 1. Unit 2 Practice Problems. Problem 2. Problem 1. Solution 1, 4, 5. Solution. Problem 3 Unit 2 Practice Problems Lesson 1 Problem 1 Rectangle measures 12 cm by 3 cm. Rectangle is a scaled copy of Rectangle. Select all of the measurement pairs that could be the dimensions of Rectangle. 1.

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

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

CS 591B Lecture 9: The OpenGL Rendering Pipeline

CS 591B Lecture 9: The OpenGL Rendering Pipeline CS 591B Lecture 9: The OpenGL Rendering Pipeline 3D Polygon Rendering Many applications use rendering of 3D polygons with direct illumination Spring 2007 Rui Wang 3D Polygon Rendering Many applications

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

Computer Science 474 Spring 2010 Viewing Transformation

Computer Science 474 Spring 2010 Viewing Transformation Viewing Transformation Previous readings have described how to transform objects from one position and orientation to another. One application for such transformations is to create complex models from

More information

Computer Graphics and GPGPU Programming

Computer Graphics and GPGPU Programming Computer Graphics and GPGPU Programming Donato D Ambrosio Department of Mathematics and Computer Science and Center of Excellence for High Performace Computing Cubo 22B, University of Calabria, Rende 87036,

More information

Z- Buffer Store the depth for each pixel on the screen and compare stored value with depth of new pixel being drawn.

Z- Buffer Store the depth for each pixel on the screen and compare stored value with depth of new pixel being drawn. Andrew Lewis - Graphics Revision Keywords PIXEL FRAME BUFFER memory of the screen VIDEO - SCREEN - WINDOW - POLYGON filled area bound by straight lines SPLINE bit of wood used by draughtsmen to draw curves

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

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

Buffers, Textures, Compositing, and Blending. Overview. Buffers. David Carr Virtual Environments, Fundamentals Spring 2005 Based on Slides by E.

Buffers, Textures, Compositing, and Blending. Overview. Buffers. David Carr Virtual Environments, Fundamentals Spring 2005 Based on Slides by E. INSTITUTIONEN FÖR SYSTEMTEKNIK LULEÅ TEKNISKA UNIVERSITET Buffers, Textures, Compositing, and Blending David Carr Virtual Environments, Fundamentals Spring 2005 Based on Slides by E. Angel Compositing,

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

Computer Graphics Lecture Notes

Computer Graphics Lecture Notes Computer Graphics Lecture Notes UNIT- Overview of Computer Graphics. Application of Computer Graphics Computer-Aided Design for engineering and architectural systems etc. Objects maybe displayed in a wireframe

More information

Blue colour text questions Black colour text sample answers Red colour text further explanation or references for the sample answers

Blue colour text questions Black colour text sample answers Red colour text further explanation or references for the sample answers Blue colour text questions Black colour text sample answers Red colour text further explanation or references for the sample answers Question 1. a) (5 marks) Explain the OpenGL synthetic camera model,

More information

CMT315 - Computer Graphics & Visual Computing

CMT315 - Computer Graphics & Visual Computing UNIVERSITI SAINS MALAYSIA Stamford College First Semester Examination 2004/2005 Academic Session October 2004 External Degree Programme Bachelor of Computer Science (Hons.) CMT315 - Computer Graphics &

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

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

(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

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

An Intersecting Modification to the Bresenham Algorithm

An Intersecting Modification to the Bresenham Algorithm 343 An Intersecting Modification to the Bresenham Algorithm Vaclav Skala* Introduction The solution of many engineering problems have as a result functions of two variables. that can be given either by

More information

COS340A Assignment 1 I Pillemer Student# March 25 th 2007 p1/15

COS340A Assignment 1 I Pillemer Student# March 25 th 2007 p1/15 COS340A Assignment 1 I Pillemer Student# 3257 495 9 March 25 th 2007 p1/15 Assignment 1 I Pillemer Student#: 3257 495 9 COS340A Date submitted: March 25, 2007 Question 1... p2 3 Question 2... p4 Question

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

CENG 477 Introduction to Computer Graphics. Graphics Hardware and OpenGL

CENG 477 Introduction to Computer Graphics. Graphics Hardware and OpenGL CENG 477 Introduction to Computer Graphics Graphics Hardware and OpenGL Introduction Until now, we focused on graphic algorithms rather than hardware and implementation details But graphics, without using

More information

Today s Agenda. Basic design of a graphics system. Introduction to OpenGL

Today s Agenda. Basic design of a graphics system. Introduction to OpenGL Today s Agenda Basic design of a graphics system Introduction to OpenGL Image Compositing Compositing one image over another is most common choice can think of each image drawn on a transparent plastic

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

COMPUTER GRAPHICS LAB # 3

COMPUTER GRAPHICS LAB # 3 COMPUTER GRAPHICS LAB # 3 Chapter 2: COMPUTER GRAPHICS by F.S HILLs. Initial steps in drawing figures (polygon, rectangle etc) Objective: Basic understanding of simple code in OpenGL and initial steps

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

CS488 2D Graphics. Luc RENAMBOT

CS488 2D Graphics. Luc RENAMBOT CS488 2D Graphics Luc RENAMBOT 1 Topics Last time, hardware and frame buffer Now, how lines and polygons are drawn in the frame buffer. Then, how 2D and 3D models drawing into the frame buffer Then, more

More information

COMP371 COMPUTER GRAPHICS

COMP371 COMPUTER GRAPHICS COMP371 COMPUTER GRAPHICS LECTURE 14 RASTERIZATION 1 Lecture Overview Review of last class Line Scan conversion Polygon Scan conversion Antialiasing 2 Rasterization The raster display is a matrix of picture

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

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

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

Announcements OpenGL. Computer Graphics. Spring CS4815

Announcements OpenGL. Computer Graphics. Spring CS4815 Computer Graphics Spring 2017-2018 Outline 1 2 Tutes and Labs Tute02, vector review (see matrix) Week02 lab Lab Marking 10 labs in total each lab worth 3% of overall grade marked on attendance and completion

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

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. - Rasterization - Philipp Slusallek

Computer Graphics. - Rasterization - Philipp Slusallek Computer Graphics - Rasterization - Philipp Slusallek Rasterization Definition Given some geometry (point, 2D line, circle, triangle, polygon, ), specify which pixels of a raster display each primitive

More information

1 Introduction to Graphics

1 Introduction to Graphics 1 1.1 Raster Displays The screen is represented by a 2D array of locations called pixels. Zooming in on an image made up of pixels The convention in these notes will follow that of OpenGL, placing the

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

Computer Graphics. Making Pictures. Computer Graphics CSC470 1

Computer Graphics. Making Pictures. Computer Graphics CSC470 1 Computer Graphics Making Pictures Computer Graphics CSC470 1 Getting Started Making Pictures Graphics display: Entire screen (a); windows system (b); [both have usual screen coordinates, with y-axis y

More information

Topic #1: Rasterization (Scan Conversion)

Topic #1: Rasterization (Scan Conversion) Topic #1: Rasterization (Scan Conversion) We will generally model objects with geometric primitives points, lines, and polygons For display, we need to convert them to pixels for points it s obvious but

More information

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

CS 381 Computer Graphics, Fall 2008 Midterm Exam Solutions. The Midterm Exam was given in class on Thursday, October 23, 2008. CS 381 Computer Graphics, Fall 2008 Midterm Exam Solutions The Midterm Exam was given in class on Thursday, October 23, 2008. 1. [4 pts] Drawing Where? Your instructor says that objects should always be

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

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

Points and lines, Line drawing algorithms. Circle generating algorithms, Midpoint circle Parallel version of these algorithms Jahangirabad Institute Of Technology Assistant Prof. Ankur Srivastava COMPUTER GRAPHICS Semester IV, 2016 MASTER SCHEDULE Unit-I Unit-II Class 1,2,3,4 Mon, Jan19,Tue20,Sat23,Mon 25 Class 5 Wed, Jan 27

More information

Lets assume each object has a defined colour. Hence our illumination model is looks unrealistic.

Lets assume each object has a defined colour. Hence our illumination model is looks unrealistic. Shading Models There are two main types of rendering that we cover, polygon rendering ray tracing Polygon rendering is used to apply illumination models to polygons, whereas ray tracing applies to arbitrary

More information

Module 13C: Using The 3D Graphics APIs OpenGL ES

Module 13C: Using The 3D Graphics APIs OpenGL ES Module 13C: Using The 3D Graphics APIs OpenGL ES BREW TM Developer Training Module Objectives See the steps involved in 3D rendering View the 3D graphics capabilities 2 1 3D Overview The 3D graphics library

More information

EF432. Introduction to spagetti and meatballs

EF432. Introduction to spagetti and meatballs EF432 Introduction to spagetti and meatballs CSC 418/2504: Computer Graphics Course web site (includes course information sheet): http://www.dgp.toronto.edu/~karan/courses/418/fall2015 Instructor: Karan

More information

Fall CSCI 420: Computer Graphics. 7.1 Rasterization. Hao Li.

Fall CSCI 420: Computer Graphics. 7.1 Rasterization. Hao Li. Fall 2015 CSCI 420: Computer Graphics 7.1 Rasterization Hao Li http://cs420.hao-li.com 1 Rendering Pipeline 2 Outline Scan Conversion for Lines Scan Conversion for Polygons Antialiasing 3 Rasterization

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

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

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

3D computer graphics: geometric modeling of objects in the computer and rendering them

3D computer graphics: geometric modeling of objects in the computer and rendering them SE313: Computer Graphics and Visual Programming Computer Graphics Notes Gazihan Alankus, Spring 2012 Computer Graphics 3D computer graphics: geometric modeling of objects in the computer and rendering

More information

Teacher Assistant : Tamir Grossinger Reception hours: by - Building 37 / office -102 Assignments: 4 programing using

Teacher Assistant : Tamir Grossinger   Reception hours: by  - Building 37 / office -102 Assignments: 4 programing using Teacher Assistant : Tamir Grossinger email: tamirgr@gmail.com Reception hours: by email - Building 37 / office -102 Assignments: 4 programing using C++ 1 theoretical You can find everything you need in

More information

OpenGL refresher. Advanced Computer Graphics 2012

OpenGL refresher. Advanced Computer Graphics 2012 Advanced Computer Graphics 2012 What you will see today Outline General OpenGL introduction Setting up: GLUT and GLEW Elementary rendering Transformations in OpenGL Texture mapping Programmable shading

More information

Line Drawing. Introduction to Computer Graphics Torsten Möller / Mike Phillips. Machiraju/Zhang/Möller

Line Drawing. Introduction to Computer Graphics Torsten Möller / Mike Phillips. Machiraju/Zhang/Möller Line Drawing Introduction to Computer Graphics Torsten Möller / Mike Phillips Rendering Pipeline Hardware Modelling Transform Visibility Illumination + Shading Perception, Color Interaction Texture/ Realism

More information

Computing Visibility. Backface Culling for General Visibility. One More Trick with Planes. BSP Trees Ray Casting Depth Buffering Quiz

Computing Visibility. Backface Culling for General Visibility. One More Trick with Planes. BSP Trees Ray Casting Depth Buffering Quiz Computing Visibility BSP Trees Ray Casting Depth Buffering Quiz Power of Plane Equations We ve gotten a lot of mileage out of one simple equation. Basis for D outcode-clipping Basis for plane-at-a-time

More information

Computer graphic -- Programming with OpenGL I

Computer graphic -- Programming with OpenGL I Computer graphic -- Programming with OpenGL I A simple example using OpenGL Download the example code "basic shapes", and compile and run it Take a look at it, and hit ESC when you're done. It shows the

More information

Computer Graphics. Chapter 3 Computer Graphics Software

Computer Graphics. Chapter 3 Computer Graphics Software Computer Graphics Chapter 3 Computer Graphics Software Outline Graphics Software Packages Introduction to OpenGL Example Program 2 3 Graphics Software Software packages General Programming Graphics Packages

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 Course 2005

Computer Graphics Course 2005 Computer Graphics Course 2005 Introduction to GLUT, GLU and OpenGL Administrative Stuff Teaching Assistant: Rony Goldenthal Reception Hour: Wed. 18:00 19:00 Room 31 (Ross 1) Questions: E-mail: cg@cs Newsgroups:

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

Drawing and Coordinate Systems

Drawing and Coordinate Systems Drawing and Coordinate Systems Coordinate Systems Screen Coordinate system World Coordinate system World window Viewport Window to viewport mapping Screen Coordinate System Glut OpenGL (0,0) Screen Coordinate

More information