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

Size: px
Start display at page:

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

Transcription

1 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 operation that is easy to formulate mathematically. We want to move the point P1 to a new position P2. P 1 =(x 1,y 1 )=(3,3) P 2 =(x 2,y 2 )=(8,5) We see that x 2 =x 1 +5 y 2 =y 1 +2 This means that translation is defined by adding an offset in the x and y direction: tx and ty: x 2 =x 1 +tx y 2 =y 1 +ty We assume that we can move whole figures by moving all the single points. For a many-sided figure, a polygon, this means moving all the corners.

2 Scaling- Again we will use a single point as a starting point: P1. P 1 =(x 1,y 1 )=(3,3) We "scale" the point by multiplying it with a scaling factor in the x-direction, sx=2, and one in the y-direction, sy=3, and get P 2 =(x 2,y 2 )=(6,9) The relation is: x 2 =x 1 sx y 2 =y 1 sy It may seem a bit strange to say that we scale a point, since a point in a geometric sense doesn't have any area. It is better to say that we are scaling a vector. If we consider the operation on a polygon, we see that the effect becomes a little more complicated than with translation. In addition to moving the single points, the polygon's angles and area is also changed. Note: Scaling is expressed in relation to origin

3 Rotation- Rotation is more complicated to express and we have to use trigonometry to formulate it. P 1 =(x 1,y 1 )=(r cos(v 1 ),r sin(v 1 )) P 2 =(x 2,y 2 )=(r cos(v 1 +v 2 ),r sin(v 1 +v 2 )) We'll introduce the trigonometric formulas for the sum of two angles: sin (a+b) = cos(a) sin(b)+sin(a) cos(b) cos (a+b) = cos(a) cos(b)-sin(a) sin(b) and get: P 1 =((r cos(v 1 ), r sin(v 1 ) ) P 2 =(r cos(v 1 ) cos(v 2 )-r sin(v 1 ) sin(v 2 ), r cos(v 1 ) sin(v 2 )+r sin(v 1 ) cos(v 2 )) We insert: x 1 =r cos(v 1 ) y 1 =r sin(v 1 ) in P2's coordinates: P 2 =(x 2,y 2 )=(x1 cos(v 2 )-y1 sin(v 2 ), x1 sin(v 2 )+y1 cos(v 2 )) and we have expressed P2's coordinates with P1's coordinates and the rotation angle v. x 2 = x 1 cos(v)-y 1 sin(v) y 2 = x 1 sin(v)+y 1 cos(v) Notie: Rotation is expressed relative to origin. This also means that the sides in figures that are rotated create new angles with the axes after a rotation. We assume that the positive rotation angle is counterclockwise.

4 Matrices We now have the following set of equations that describes the three basic operations: Translation defined by tx and ty x 2 =x 1 +tx y 2 =y 1 +ty Scaling defined by sx and sy x 2 =sx x 1 y 2 =sy y 1 Rotation defined by v x 2 = x 1 cos(v)-y 1 sin(v) y 2 = x 1 sin(v)+y 1 cos(v) We want to find a common way to represent the operations. We know from linear algebra that we can represent linear dependencies like these with matrices. If we take the equation sets directly we get: Translation decided by tx and ty Scaling decided by sx and sy Rotation decided by v x2 x1 tx = + y2 y1 tx x2 sx 0 x1 = * y2 0 sy y1 x2 cos(v) -sin(v) x1 = * y2 sin(v) cos(v) y1 The matrix operations multiplication and addition are described in the module: Algebra. S.NO RGPV QUESTIONS Year Marks Q.1 Derive a general 2D-Transformation matrix for rotation about the origin. perform a 45 0 rotation of a square having vertices- A(0,0),B(0,2),C(2,2),D(2,0) about the origin. RGPV Q.2 RGPV Q.3 Find the new coordinates of the triangle A(0,0),B(1,1) and C(5,2) after it has been RGPV i)magnified to twice its size ii)reduced to half its size.

5 UNIT 2 Homogeneous coordinates /Shearing Unit-02/Lecture-02 Homogeneous coordinates- (RGPV-2003, 04, 06, 09, 11) The three basic operations have a little different form. We want the same form and introduce homogeneous coordinates. This means that we write a position vector like this: x y 1 Then we can write all basic operations as multiplication between a 3 x 3 matrix and a 1 x 3 vector. Translation Scaling Rotation x2 1 0 tx x1 y2 = 0 1 ty * y x2 sx 0 0 x1 y2 = 0 sy 0 * y x2 cos(v) -sin(v) 0 x1 y2 = sin(v) cos(v) 0 * y We have a general form P2=M P1 Where P1 and P2 are expressed in homogeneous coordinates. We will not worry about the third coordinate, the number 1. We'll not try to give a geometric explanation of this. The whole point is to standardize the mathematics in the transformations. The third coordinate stays the same in the basic transformations and, as we will se later, in combinations of them. The module Homogenizing discusses this subject a bit further. Geometry- We'll use this common form of expression for many things. But first, lets look at some simple relations between matrices and geometry. The identity matrix An important matrix is the identity matrix: I=

6 It transforms a point to itself: P1=P2=I P1 This can be interpreted as - translation with (0,0) - rotation with 0 degrees, since cos (0)=1 and sin (0) =0 - scaling with (1,1) We will need the identity matrix in many situations. In OpenGL there is a function to specify this as the current transformation matrix. glloadidentity () Later we will learn why this function is important. Mirroring We can mirror a point around the coordinate axes with matrices. Around the y-axis, a scaling with (-1,0): SY= Around the x-axis, a scaling with (0,-1): SX= Shearing A special operation called shearing is a scaling along one of the axes that depends on the coordinate on the other axis, for example the x-axis depends on y:

7 1 s 0 S= This is a representation of x2=x1+s y and y2=y1. The figure shows shearing used on a rectangle and with s=1. We notice that this is the effect we find in italic fonts. Projection We can project a point, for example onto the x-axis with the matrix I= In the plane we see that the only effect from this parallel projection is that it removes the y-coordinate. The consequence of this will always be a line along the x-axis. In space projections are more interesting. Compound operations- It is nice to have a common form for the basic transformations. We get the profit when we see how we can combine geometric operations by combining matrices. We can combine several geometric operations by multiplying the respective matrices. Before we do this, we can have a look at the advantages. They are essentially three: 1. Rendering speed. Typically we will be in a situation where we have to calculate coordinates for a large number of points, maybe thousands, when we represent our drawing on the screen. The coordinates for these points are changed by various reasons, and their position could be the result of a large number of geometric transformations. We want to decrease the number of calculations for every point. Instead of multiplying every vector (point) with all of the matrices that are involved in turn, we want to multiply it with only one matrix. It works like this in OpenGL: There is always a current model matrix that all of the points are multiplied with. 2. Modeling. We will return to this later. But let us indicate the problem for now by saying that we often have figures put together by different components. The different components are combined in a way that makes their position dependant of other parts of the figure. For example are the fingers on a robot dependant of the position of the arm they are attached to. Then it could be clever to reuse the transformations matrices several times. A practical way to do this is to have a stack of transformation matrices. This is the way it is done in OpenGL. 3. We can integrate the viewing transformation with the model transformation. Let s study some simple examples that illustrate the principle. Two translations We'll start with a simple example. Let us assume that we are doing two translations on a point. Let us assume that the first translation is (2,3) and that the second is (4,6). We can of course easily from geometrical

8 considerations establish that the result should be a translation (6,9). If not, something has to be wrong with our reasoning. The two matrices are: T1= and T2= and the product: T1*T2= We see that the result is as desired. We achieve a matrix that realizes the compound operations by multiplying the two single matrices. We also see that in this special case we could have gotten the matrix by adding the matrices as well, but this is a special case for two translations. We also see that in this case T1 T2=T2 T1. This is not surprising. It doesn't matter in what order the operations are done. However in general the matrix multiplication is not independent of the factor's order. This is a special case. We want to examine the relation between order and matrix multiplication closer in the next example. Rotation around another point than origin We consider a triangle with the corners a (1, 1), b (2,-1) and c (4, 2). We want to rotate this triangle 90 degrees around one of its corners, a. We know that rotation, as we described it above, always is performed around origin. We have to make a strategy that combines several transformations. We try two strategies and then try to draw some conclusions. A strategy could be: 1. Move origin to rotation corner 2. Rotate 90 degrees 3. Move origin back 4. It is easy to put up the three matrices that realize the three operations.

9 Move origin to the corner, a: Rotate 90 degrees: Move origin back: T1= R = T2= If we follow our reasoning we will get a matrix M=T1 R T2, and we should get the desired effect by multiplying all the points in the triangle with this matrix, P2=M P M = * * = * = We use M on the three points in the triangle and get: a' = M*a * 1 = b' = M*b * -1 = c' = M*c * 2 = and we can draw the result: Which is what we wanted. Our strategy was successful. An alternative strategy could be as follows:

10 1. Move the triangle so that a ends up in origin 2. Rotate 90 degrees 3. Move the triangle back, so that a ends up in its original place Since moving the point a to the origin is the opposite of moving the origin to a, the first operation is the same as what we called T2 above. In the same way step 3, moving the triangle back, is the same as what we called T1 above. The alternative strategy becomes: M=T2 R T1. If we calculate this we get: M = If we use this matrix on the triangle's three points we get a solution like this: which is not what we wanted. Above we found that moving the point to origin and moving origin to the point are opposite transformations. The same transformation matrices are a part of both strategies, but the order they are used in is different. We also saw that the first strategy with moving the origin was successful. This leads to the following formulation of a strategy to couple matrices to geometric reasoning. We can do either: 1. We can go through with the reasoning on the origin, and set up the matrices in the same order as we reason. 2. We can go through with the reasoning on the figure, and set up the matrices in the opposite order of the geometric reasoning. Normally we will use strategy 1, but some times it can be easier to reason with strategy 2. S.NO RGPV QUESTIONS Year Marks Q.1 Why are homogenous coordinate system used for transformation computation in computer graphics? Rgpv- 2005,09,11 Q.2 Explain shearing and reflection with example. Rgpv

11 UNIT 2 Transformations as matrices/ Composite Transformations Unit-02/Lecture-03 Transformations as matrices (rgpv-2007,09) Scale: xnew = sxxold ynew = syyold Rotation: x2 = x1cosθ - y1sin θ y2 = x1sin θ + y1cos θ Translation: xnew = xold + tx ynew = yold + ty Homogeneous Coordinates In order to represent a translation as a matrix multiplication operation we use 3 x 3 matrices and pad our points to become 3x 1 matrices. This coordinate system (using three values to represent a 2D point) is called homogeneous coordinates.

12 Composite Transformations: Suppose we wished to perform multiple transformations on a point: Remember: Matrix multiplication is associative, not commutative! Transform matrices must be pre-multiplied The first transformation you want to perform will be at the far right, just before the point. Composite Transformations -Scaling Given our three basic transformations we can create other transformations. A problem with the scale transformation is that it also moves the object being scaled. Scale a line between (2, 1) (4,1) to twice its length.

13 Fixed Point Scaling Scale by 2 with fixed point = (2,1) Translate the point (2,1) to the origin Scale by 2 Translate origin to point (2,1) S.N O RGPV QUESTIONS Year Marks Q.1 Give the transformation matrix for 2D rotation about any arbitrary point(r x, R y ). Rgpv Q.2 Magnify the triangle with vertices A(0,0),B(1,1) and C(5,2) to twice its size while keeping C(5,2) fixed. Rgpv 2014,2007,2008 7,10

14 UNIT 2 2D transformation Unit-02/Lecture-04 2D transformation: Rotate around an arbitrary point A: (rgpv 2007,09) Rotate around an arbitrary point: Rotate around an arbitrary point :We know how to rotate around the origin-

15 but that is not what we want to do! So what do we do? Transform it to a known case Translate(-Ax,-Ay)

16 Second step: Rotation-Translate(-Ax,-Ay),Rotate(-90) Final: Put everything back Translate(-Ax,-Ay) Rotate(-90) Translate(Ax,Ay) Rotation about arbitrary point IMPORTANT!: Order M = T(Ax,Ay) R(-90) T(-Ax,-Ay)

17 Rotation about arbitrary point Rotation Of θ Degrees About Point (x,y) Translate (x,y) to origin Rotate Translate origin to (x,y) Shears Reflections Reflection about the y-axis Reflection about the x-axis

18 Reflection about the origin Reflection about the line y=x S.NO RGPV QUESTIONS Year Marks Q.1 Give the transformation matrix for 2D rotation about any Rgpv arbitrary point(r x, R y ). Q.2 Find and show the transformation to reflect a polygon whose vertices are A(-1,0),B(0,-3),C(1,0) and D(0,3)about the line y=x+3. Q.3 Prove that a uniform scaly(s X =S Y ) and a rotation form a commutative pair of operations, but that, in general, scaling and rotation are not commutative. Rgpv Rgpv

19 UNIT 2 Windowing & Clipping in 2D Unit-02/Lecture-05 THE VIEWING PIPELINE- RGPV(2009,11,12,13,14) A world-coordinate area selected for display is called a window. An area on a display device to which a window is mapped is called a viewport. The window defines what is to be viewed; the viewport defines where it is to be displayed. Often, windows and viewports are rectangles in standard position, with the rectangle edges parallel to the coordinate axes. Other window or viewport geometries, such as general polygon shapes and circles, are used in some applications, but these shapes take longer to process. In general, the mapping of a part of a world-coordinate scene to device coordinates is referred to as a viewing transformation. Sometimes the two-dimensional viewing transformation is simply referred to as the window-to-viewport transformation or the windowing transformation. But, in general, viewing involves more than just the transformation from the window to the viewport. Figure 6.1 illustrates the mapping of a picture section that falls within a rectangular window onto a designated &angular viewport. In computer graphics terminology, the term window originally referred to an area of a picture that is selected for viewing, as defined at the beginning of this section. Unfortunately, the same tern is now used in window-manager systems to refer to any rectangular screen area that can be moved about, resized, and made active or inactive. We will only use the term window to refer to an area of a world-coordinate scene that has been selected for display. By changing the position of the viewport, we can view objects at different positions on the display area of an output device. Also, by varying the size of viewports, we can change the size and proportions of displayed objects. We achieve zooming effects by successively mapping different-sized windows on a fixed-size viewport. As the windows are made smaller, we zoom in on some part of a scene to view details that are not shown with larger windows. Similarly,more overview is obtained by zooming out from a section of a scene with successively larger windows. Panning effects are produced by moving a fixed-size window across the various objects in a scene.viewports are typically defined within the unit square (normalized coordinates). This provides a means for separating the viewing and other transformations from specific output-device requirements, so that the graphics package is largely device-independent. Once the scene has been transferred to normalized coordinates, the unit square is simply mapped to the display area for the particular output device in use at that time. Different output devices can be used by providing the appropriate device drivers.

20 Windowing-A scene is made up of a collection of objects specified in world coordinates When we display a scene only those objects within a particular window are displayed

21 Because drawing things to a display takes time we clip everything outside the window Clipping-For the image below consider which lines and points should be kept and which ones should be clipped Point Clipping-Easy - a point (x,y) is not clipped if:wxmin _ x _ wxmax AND wymin _ y _ wymax otherwise it is clipped

22 Line Clipping-Harder - examine the end-points of each line to see if they are in the window or not S.NO RGPV QUESTIONS Year Marks Q Q

23 UNIT 2 CoClipping Algorithm Unit-02/Lecture-06 Brute Force Line Clipping- Brute force line clipping can be performed as follows: Don t clip lines with both end-points within the window For lines with one endpoint inside the window and one end-point outside, calculate the intersection point (using the equation of the line) and clip from this point out For lines with both end points outside the window test the line for intersection with all of the window boundaries, and clip appropriately However, calculating line intersections is computationally expensive Because a scene can contain so many lines, the brute force approach to clipping is much too slow Cohen-Sutherland Clipping Algorithm- An efficient line clipping algorithm, The key advantage of the algorithm is that it vastly reduces the number of line intersections that must be calculated One of the earliest algorithms with many variations in use. Processing time reduced by performing more test before proceeding to the intersection calculation. Initially, every line endpoint is assigned a four digit binary value called a region code,and each bit is used to indicate whether the point is inside or outside one of the clipping window boundaries.

24 We can reference the window edges in any order, and here is one possibility. For this ordering, (bit 1) references the left boundary, and (bit 4) references the top one. A value of 1 (true) in any bit position indicates that the endpoint is outsides of that border. A value of 0 (false) indicates that the endpoint is inside or on that border. Cohen-Sutherland: World Division The four window borders create nine regions The Figure below lists the value for the binary code in each of these regions. Thus, an endpoint that is below and to the left of the clipping window is assigned the region (0101). The region code for any endpoint inside the clipping window is (0000). Cohen-Sutherland: Labeling- Every end-point is labeled with the appropriate region code

25 Lines In The Window- Lines completely contained within the window boundaries have region code [0000] for both end-points so are not clipped Lines Outside The Window- Any lines with 1 in the same bit position for both end-points is completely outside and must be clipped. For example a line with 1010 code for one endpoint and 0010 for the other (line P11, P12) is completely to the right of the clipping window. Cohen-Sutherland: Inside/Outside Lines- We can perform inside/outside test for lines using logical operators. When the or operation between two endpoint codes is false (0000), the line is inside the clipping window, and we save it. When the and operation between two endpoint codes is true (not 0000), the line is completely outside the clipping window, and we can eliminate it.

26 Lines that cannot be identified as completely inside or outside the window may or may not cross the window interior These lines are processed as follows: Compare an end-point outside the window to a boundary (choose any order in which to consider boundaries e.g. left, right, bottom, top) and determine how much can be discarded If the remainder of the line is entirely inside or outside the window, retain it or clip it respectively Otherwise, compare the remainder of the line against the other window boundaries Continue until the line is either discarded or a segment inside the window is found We can use the region codes to determine which window boundaries should be considered for intersection To check if a line crosses a particular boundary we compare the appropriate bits in the region codes of its end-points Cohen-Sutherland Examples- If one of these is a 1 and the other is a 0 then the line crosses the boundary Consider the line P9 to P10 below Start at P10 From the region codes of the two end-points we know the line doesn t cross the left or right boundary Calculate the intersection of the line with the bottom boundary to generate point P10 The line P9 to P10 is completely inside the window so is retained Consider the line P3 to P4 below Start at P4 From the region codes of the two end-points we know the line crosses the left boundary so calculate the intersection point to generate P4 The line P3 to P4 is completely outside the window so is clipped

27 Consider the line P7 to P8 below Start at P7 From the two region codes of the two end-points we know the line crosses the left boundary so calculate the intersection point to generate P7, Consider the line P7 to P8 Start at P8 Calculate the intersection with the right boundary to generate P8 P7 to P8 is inside the window so is retained

28 Calculating Line Intersections- Intersection points with the window boundaries are calculated using the line equation parameters Consider a line with the end-points (x1, y1) and (x2, y2) The y-coordinate of an intersection with a vertical window boundary can be calculated using: y = y1 + m (xboundary - x1) where x boundary can be set to either wxmin or wxmax The x-coordinate of an intersection with a horizontal window boundary can be calculated using: x = x1 + (yboundary - y1) /m where y boundary can be set to either wymin or wymax m is the slope of the line in question and can be calculated as m = (y2 - y1) / (x2 - x1) S.NO RGPV QUESTIONS Year Marks Q Q

29 UNIT 2 Area Clipping/ Sutherland-Hodgman Polygon Clipping Unit-02/Lecture-07 Area Clipping- Similarly to lines, areas must be clipped to a window boundary Consideration must be taken as to which portions of the area must be clipped.

30 Sutherland-Hodgman Polygon C-

31

32 Sutherland-Hodgman Polygon Clipping Example- Start at the left boundary 1,2 (out,out) _ clip 2,3 (in,out) _ save 1, 3 3,4 (in,in) _ save 4 4,5 (in,in) _ save 5 5,6 (in,out) _ save 5 Saved points _ 1,3,4,5,5 6,1 (out,out) _ clip Using these points we repeat the process For the next boundary. S.NO RGPV QUESTIONS Year Marks Q.1 Draw a flowchart, illuminating the logic of the Sutherland Hodgeman algorithm. Q.2 Explain the Sutherland-Hodgeman polygon clipping algorithm with an example. 2012,

33 UNIT 2 Weiler-Atherton algorithms Unit-02/Lecture-08 Weiler -Atherton Polygon Clipping- RGPV(2011) Here, the vertex-processing procedures for window boundaries are modified so that concave polygons are displayed correctly. This clipping procedure was developed as a method for identifying visible surfaces, and so it can be applied with arbitrary polygon-clipping regions. The basic idea in this algorithm is that instead of always proceeding around the polygon edges as vertices are processed, we sometimes want to follow the window boundaries. Which path we follow depends on the polygon-processing direction (clockwise or counterclockwise) and whether tile pair of polygon vertices Currently being processed represents an outside-to-inside pair or an inside- to-outside pair. For clockwise processing of polygon vertices, we use the following rules: For an outside-to-inside pair of vertices, follow the polygon boundary. For an inside-to-outside pair of vertices, follow the window boundary in a clockwise direction. In Fig. 6-25, the processing direction in the Weiler-Atherton algorithm and the resulting clipped polygon is shown for a rectangular clipping window. An improvement on the Weiler-Atherton algorithm is the Weiler algorithm, which applies constructive solid geometry ideas to clip an arbitrary polygon against any polygon clipping region. Figure 6-26 illustrates the general idea in this approach. For the two polygons in this figure, the correctly clipped polygons calculated as the intersection of the clipping polygon and the polygon object.

34 Other Polygon-Cli pping Algorithms-Various parametric line-clipping methods have also been adapted to polygon clipping. And they are particularly well suited for clipping against convex polygon-clipping windows. The Liang-Barsky Line Clipper, for example, can be extended to polygon clipping with a general approach similar to that of the Sutherland-Hodgeman method. Parametric line representations are used to process polygon edges in order around the polygon perimeter using region-testing procedures Similar to those used in line clipping. S.NO RGPV QUESTIONS Year Marks Q Derive the form of the transformation matrix for a reflection about an arbitrary line with equation y=mx+c. Q.2 Contrast the efficiency of Cohen-Sutherland and Cyrus-beck line clipping algorithms

35

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

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

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

UNIT 2 2D TRANSFORMATIONS

UNIT 2 2D TRANSFORMATIONS UNIT 2 2D TRANSFORMATIONS Introduction With the procedures for displaying output primitives and their attributes, we can create variety of pictures and graphs. In many applications, there is also a need

More information

DHANALAKSHMI COLLEGE OF ENGINEERING, CHENNAI

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

More information

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

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

More information

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

COMP3421. Vector geometry, Clipping

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

More information

Section III: TRANSFORMATIONS

Section III: TRANSFORMATIONS Section III: TRANSFORMATIONS in 2-D 2D TRANSFORMATIONS AND MATRICES Representation of Points: 2 x 1 matrix: X Y General Problem: [B] = [T] [A] [T] represents a generic operator to be applied to the points

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

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

Computer Graphics: Geometric Transformations

Computer Graphics: Geometric Transformations Computer Graphics: Geometric Transformations Geometric 2D transformations By: A. H. Abdul Hafez Abdul.hafez@hku.edu.tr, 1 Outlines 1. Basic 2D transformations 2. Matrix Representation of 2D transformations

More information

Computer Graphics Viewing Objective

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

More information

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

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

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

(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

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

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

From Vertices To Fragments-1

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

More information

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

Basics of Computational Geometry

Basics of Computational Geometry Basics of Computational Geometry Nadeem Mohsin October 12, 2013 1 Contents This handout covers the basic concepts of computational geometry. Rather than exhaustively covering all the algorithms, it deals

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

Two Dimensional Viewing

Two Dimensional Viewing Two Dimensional Viewing Dr. S.M. Malaek Assistant: M. Younesi Two Dimensional Viewing Basic Interactive Programming Basic Interactive Programming User controls contents, structure, and appearance of objects

More information

Clipping Lines. Dr. Scott Schaefer

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

More information

Graphics and Interaction Transformation geometry and homogeneous coordinates

Graphics and Interaction Transformation geometry and homogeneous coordinates 433-324 Graphics and Interaction Transformation geometry and homogeneous coordinates Department of Computer Science and Software Engineering The Lecture outline Introduction Vectors and matrices Translation

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

COMP30019 Graphics and Interaction Transformation geometry and homogeneous coordinates

COMP30019 Graphics and Interaction Transformation geometry and homogeneous coordinates COMP30019 Graphics and Interaction Transformation geometry and homogeneous coordinates Department of Computer Science and Software Engineering The Lecture outline Introduction Vectors and matrices Translation

More information

2D and 3D Transformations AUI Course Denbigh Starkey

2D and 3D Transformations AUI Course Denbigh Starkey 2D and 3D Transformations AUI Course Denbigh Starkey. Introduction 2 2. 2D transformations using Cartesian coordinates 3 2. Translation 3 2.2 Rotation 4 2.3 Scaling 6 3. Introduction to homogeneous coordinates

More information

CSE528 Computer Graphics: Theory, Algorithms, and Applications

CSE528 Computer Graphics: Theory, Algorithms, and Applications CSE528 Computer Graphics: Theory, Algorithms, and Applications Hong Qin Stony Brook University (SUNY at Stony Brook) Stony Brook, New York 11794-2424 Tel: (631)632-845; Fax: (631)632-8334 qin@cs.stonybrook.edu

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

Lab Manual. Computer Graphics. T.E. Computer. (Sem VI)

Lab Manual. Computer Graphics. T.E. Computer. (Sem VI) Lab Manual Computer Graphics T.E. Computer (Sem VI) Index Sr. No. Title of Programming Assignments Page No. 1. Line Drawing Algorithms 3 2. Circle Drawing Algorithms 6 3. Ellipse Drawing Algorithms 8 4.

More information

Overview. Affine Transformations (2D and 3D) Coordinate System Transformations Vectors Rays and Intersections

Overview. Affine Transformations (2D and 3D) Coordinate System Transformations Vectors Rays and Intersections Overview Affine Transformations (2D and 3D) Coordinate System Transformations Vectors Rays and Intersections ITCS 4120/5120 1 Mathematical Fundamentals Geometric Transformations A set of tools that aid

More information

2D TRANSFORMATIONS AND MATRICES

2D TRANSFORMATIONS AND MATRICES 2D TRANSFORMATIONS AND MATRICES Representation of Points: 2 x 1 matrix: x y General Problem: B = T A T represents a generic operator to be applied to the points in A. T is the geometric transformation

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

Computer Science 336 Fall 2017 Homework 2

Computer Science 336 Fall 2017 Homework 2 Computer Science 336 Fall 2017 Homework 2 Use the following notation as pseudocode for standard 3D affine transformation matrices. You can refer to these by the names below. There is no need to write out

More information

Object Representation Affine Transforms. Polygonal Representation. Polygonal Representation. Polygonal Representation of Objects

Object Representation Affine Transforms. Polygonal Representation. Polygonal Representation. Polygonal Representation of Objects Object Representation Affine Transforms Polygonal Representation of Objects Although perceivable the simplest form of representation they can also be the most problematic. To represent an object polygonally,

More information

CSE328 Fundamentals of Computer Graphics

CSE328 Fundamentals of Computer Graphics CSE328 Fundamentals of Computer Graphics Hong Qin State University of New York at Stony Brook (Stony Brook University) Stony Brook, New York 794--44 Tel: (63)632-845; Fax: (63)632-8334 qin@cs.sunysb.edu

More information

Computer Graphics. Chapter 5 Geometric Transformations. Somsak Walairacht, Computer Engineering, KMITL

Computer Graphics. Chapter 5 Geometric Transformations. Somsak Walairacht, Computer Engineering, KMITL Chapter 5 Geometric Transformations Somsak Walairacht, Computer Engineering, KMITL 1 Outline Basic Two-Dimensional Geometric Transformations Matrix Representations and Homogeneous Coordinates Inverse Transformations

More information

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

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

More information

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

Game Engineering: 2D

Game Engineering: 2D Game Engineering: 2D CS420-2010F-07 Objects in 2D David Galles Department of Computer Science University of San Francisco 07-0: Representing Polygons We want to represent a simple polygon Triangle, rectangle,

More information

Computer Graphics. - Clipping - Philipp Slusallek & Stefan Lemme

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

More information

Chapter 5. Transforming Shapes

Chapter 5. Transforming Shapes Chapter 5 Transforming Shapes It is difficult to walk through daily life without being able to see geometric transformations in your surroundings. Notice how the leaves of plants, for example, are almost

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

CS 4204 Computer Graphics

CS 4204 Computer Graphics CS 4204 Computer Graphics 3D Viewing and Projection Yong Cao Virginia Tech Objective We will develop methods to camera through scenes. We will develop mathematical tools to handle perspective projection.

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

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

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

Chapter 5. Projections and Rendering

Chapter 5. Projections and Rendering Chapter 5 Projections and Rendering Topics: Perspective Projections The rendering pipeline In order to view manipulate and view a graphics object we must find ways of storing it a computer-compatible way.

More information

CS 325 Computer Graphics

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

More information

Interactive Math Glossary Terms and Definitions

Interactive Math Glossary Terms and Definitions Terms and Definitions Absolute Value the magnitude of a number, or the distance from 0 on a real number line Addend any number or quantity being added addend + addend = sum Additive Property of Area the

More information

Lecture 9: Transformations. CITS3003 Graphics & Animation

Lecture 9: Transformations. CITS3003 Graphics & Animation Lecture 9: Transformations CITS33 Graphics & Animation E. Angel and D. Shreiner: Interactive Computer Graphics 6E Addison-Wesley 212 Objectives Introduce standard transformations Rotation Translation Scaling

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

A VERTICAL LOOK AT KEY CONCEPTS AND PROCEDURES GEOMETRY

A VERTICAL LOOK AT KEY CONCEPTS AND PROCEDURES GEOMETRY A VERTICAL LOOK AT KEY CONCEPTS AND PROCEDURES GEOMETRY Revised TEKS (2012): Building to Geometry Coordinate and Transformational Geometry A Vertical Look at Key Concepts and Procedures Derive and use

More information

Geometric transformations assign a point to a point, so it is a point valued function of points. Geometric transformation may destroy the equation

Geometric transformations assign a point to a point, so it is a point valued function of points. Geometric transformation may destroy the equation Geometric transformations assign a point to a point, so it is a point valued function of points. Geometric transformation may destroy the equation and the type of an object. Even simple scaling turns a

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

To graph the point (r, θ), simply go out r units along the initial ray, then rotate through the angle θ. The point (1, 5π 6. ) is graphed below:

To graph the point (r, θ), simply go out r units along the initial ray, then rotate through the angle θ. The point (1, 5π 6. ) is graphed below: Polar Coordinates Any point in the plane can be described by the Cartesian coordinates (x, y), where x and y are measured along the corresponding axes. However, this is not the only way to represent points

More information

Write C++/Java program to draw line using DDA and Bresenham s algorithm. Inherit pixel class and Use function overloading.

Write C++/Java program to draw line using DDA and Bresenham s algorithm. Inherit pixel class and Use function overloading. Group A Assignment No A1. Write C++/Java program to draw line using DDA and Bresenham s algorithm. Inherit pixel class and Use function overloading. Aim: To draw line using DDA and Bresenham s algorithm

More information

2D transformations: An introduction to the maths behind computer graphics

2D transformations: An introduction to the maths behind computer graphics 2D transformations: An introduction to the maths behind computer graphics Lecturer: Dr Dan Cornford d.cornford@aston.ac.uk http://wiki.aston.ac.uk/dancornford CS2150, Computer Graphics, Aston University,

More information

Vector Algebra Transformations. Lecture 4

Vector Algebra Transformations. Lecture 4 Vector Algebra Transformations Lecture 4 Cornell CS4620 Fall 2008 Lecture 4 2008 Steve Marschner 1 Geometry A part of mathematics concerned with questions of size, shape, and relative positions of figures

More information

CMSC427: Computer Graphics Lecture Notes Last update: November 21, 2014

CMSC427: Computer Graphics Lecture Notes Last update: November 21, 2014 CMSC427: Computer Graphics Lecture Notes Last update: November 21, 2014 TA: Josh Bradley 1 Linear Algebra Review 1.1 Vector Multiplication Suppose we have a vector a = [ x a y a ] T z a. Then for some

More information

CS 4204 Computer Graphics

CS 4204 Computer Graphics CS 424 Computer Graphics 2D Transformations Yong Cao Virginia Tech References: Introduction to Computer Graphics course notes by Doug Bowman Interactive Computer Graphics, Fourth Edition, Ed Angle Transformations

More information

Viewing Transformation. Clipping. 2-D Viewing Transformation

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

More information

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

Junior Circle Meeting 9 Commutativity and Inverses. May 30, We are going to examine different ways to transform the square below:

Junior Circle Meeting 9 Commutativity and Inverses. May 30, We are going to examine different ways to transform the square below: Junior Circle Meeting 9 Commutativity and Inverses May 0, 2010 We are going to examine different ways to transform the square below: Just as with the triangle from last week, we are going to examine flips

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

Carnegie Learning Math Series Course 2, A Florida Standards Program

Carnegie Learning Math Series Course 2, A Florida Standards Program to the students previous understanding of equivalent ratios Introduction to. Ratios and Rates Ratios, Rates,. and Mixture Problems.3.4.5.6 Rates and Tables to Solve Problems to Solve Problems Unit Rates

More information

TIMSS 2011 Fourth Grade Mathematics Item Descriptions developed during the TIMSS 2011 Benchmarking

TIMSS 2011 Fourth Grade Mathematics Item Descriptions developed during the TIMSS 2011 Benchmarking TIMSS 2011 Fourth Grade Mathematics Item Descriptions developed during the TIMSS 2011 Benchmarking Items at Low International Benchmark (400) M01_05 M05_01 M07_04 M08_01 M09_01 M13_01 Solves a word problem

More information

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

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

More information

Matrices. Chapter Matrix A Mathematical Definition Matrix Dimensions and Notation

Matrices. Chapter Matrix A Mathematical Definition Matrix Dimensions and Notation Chapter 7 Introduction to Matrices This chapter introduces the theory and application of matrices. It is divided into two main sections. Section 7.1 discusses some of the basic properties and operations

More information

Affine Transformation. Edith Law & Mike Terry

Affine Transformation. Edith Law & Mike Terry Affine Transformation Edith Law & Mike Terry Graphic Models vs. Images Computer Graphics: the creation, storage and manipulation of images and their models Model: a mathematical representation of an image

More information

INTRODUCTION TO COMPUTER GRAPHICS. It looks like a matrix Sort of. Viewing III. Projection in Practice. Bin Sheng 10/11/ / 52

INTRODUCTION TO COMPUTER GRAPHICS. It looks like a matrix Sort of. Viewing III. Projection in Practice. Bin Sheng 10/11/ / 52 cs337 It looks like a matrix Sort of Viewing III Projection in Practice / 52 cs337 Arbitrary 3D views Now that we have familiarity with terms we can say that these view volumes/frusta can be specified

More information

521493S Computer Graphics Exercise 2 Solution (Chapters 4-5)

521493S Computer Graphics Exercise 2 Solution (Chapters 4-5) 5493S Computer Graphics Exercise Solution (Chapters 4-5). Given two nonparallel, three-dimensional vectors u and v, how can we form an orthogonal coordinate system in which u is one of the basis vectors?

More information

(Refer Slide Time: 00:04:20)

(Refer Slide Time: 00:04:20) Computer Graphics Prof. Sukhendu Das Dept. of Computer Science and Engineering Indian Institute of Technology, Madras Lecture 8 Three Dimensional Graphics Welcome back all of you to the lectures in Computer

More information

Vector Calculus: Understanding the Cross Product

Vector Calculus: Understanding the Cross Product University of Babylon College of Engineering Mechanical Engineering Dept. Subject : Mathematics III Class : 2 nd year - first semester Date: / 10 / 2016 2016 \ 2017 Vector Calculus: Understanding the Cross

More information

N-Views (1) Homographies and Projection

N-Views (1) Homographies and Projection CS 4495 Computer Vision N-Views (1) Homographies and Projection Aaron Bobick School of Interactive Computing Administrivia PS 2: Get SDD and Normalized Correlation working for a given windows size say

More information

2D and 3D Coordinate Systems and Transformations

2D and 3D Coordinate Systems and Transformations Graphics & Visualization Chapter 3 2D and 3D Coordinate Systems and Transformations Graphics & Visualization: Principles & Algorithms Introduction In computer graphics is often necessary to change: the

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

Clipping and Intersection

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

More information

12.4 Rotations. Learning Objectives. Review Queue. Defining Rotations Rotations

12.4 Rotations. Learning Objectives. Review Queue. Defining Rotations Rotations 12.4. Rotations www.ck12.org 12.4 Rotations Learning Objectives Find the image of a figure in a rotation in a coordinate plane. Recognize that a rotation is an isometry. Review Queue 1. Reflect XY Z with

More information

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

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

More information

Linear transformations Affine transformations Transformations in 3D. Graphics 2009/2010, period 1. Lecture 5: linear and affine transformations

Linear transformations Affine transformations Transformations in 3D. Graphics 2009/2010, period 1. Lecture 5: linear and affine transformations Graphics 2009/2010, period 1 Lecture 5 Linear and affine transformations Vector transformation: basic idea Definition Examples Finding matrices Compositions of transformations Transposing normal vectors

More information

Moore Catholic High School Math Department

Moore Catholic High School Math Department Moore Catholic High School Math Department Geometry Vocabulary The following is a list of terms and properties which are necessary for success in a Geometry class. You will be tested on these terms during

More information

3D Mathematics. Co-ordinate systems, 3D primitives and affine transformations

3D Mathematics. Co-ordinate systems, 3D primitives and affine transformations 3D Mathematics Co-ordinate systems, 3D primitives and affine transformations Coordinate Systems 2 3 Primitive Types and Topologies Primitives Primitive Types and Topologies 4 A primitive is the most basic

More information

2D/3D Geometric Transformations and Scene Graphs

2D/3D Geometric Transformations and Scene Graphs 2D/3D Geometric Transformations and Scene Graphs Week 4 Acknowledgement: The course slides are adapted from the slides prepared by Steve Marschner of Cornell University 1 A little quick math background

More information

file:///c /Documents%20and%20Settings/Jason%20Raftery/My%20Doc...e%20184%20-%20Spring%201998%20-%20Sequin%20-%20Midterm%202.htm

file:///c /Documents%20and%20Settings/Jason%20Raftery/My%20Doc...e%20184%20-%20Spring%201998%20-%20Sequin%20-%20Midterm%202.htm UNIVERSITY OF CALIFORNIA Dept. EECS/CS Div. CS 184 - Spring 1998 FOUNDATIONS OF COMPUTER GRAPHICS Prof. C.H.Sequin TAKE HOME QUIZ #2 Your Name: Your Class Computer Account: cs184- INSTRUCTIONS ( Read carefully!)

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

CS 130 Exam I. Fall 2015

CS 130 Exam I. Fall 2015 S 3 Exam I Fall 25 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

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

Worksheet 5. 3 Less trigonometry and more dishonesty/linear algebra knowledge Less trigonometry, less dishonesty... 4

Worksheet 5. 3 Less trigonometry and more dishonesty/linear algebra knowledge Less trigonometry, less dishonesty... 4 Worksheet 5 Contents 1 Just look at the book, on page 74 1 2 Trigonometry and honesty 1 3 Less trigonometry and more dishonesty/linear algebra knowledge 3 3.1 Less trigonometry, less dishonesty...............................

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

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

GEOMETRY & INEQUALITIES. (1) State the Triangle Inequality. In addition, give an argument explaining why it should be true.

GEOMETRY & INEQUALITIES. (1) State the Triangle Inequality. In addition, give an argument explaining why it should be true. GEOMETRY & INEQUALITIES LAMC INTERMEDIATE GROUP - 2/23/14 The Triangle Inequality! (1) State the Triangle Inequality. In addition, give an argument explaining why it should be true. (2) Now we will prove

More information

Therefore, after becoming familiar with the Matrix Method, you will be able to solve a system of two linear equations in four different ways.

Therefore, after becoming familiar with the Matrix Method, you will be able to solve a system of two linear equations in four different ways. Grade 9 IGCSE A1: Chapter 9 Matrices and Transformations Materials Needed: Straightedge, Graph Paper Exercise 1: Matrix Operations Matrices are used in Linear Algebra to solve systems of linear equations.

More information

1 Affine and Projective Coordinate Notation

1 Affine and Projective Coordinate Notation CS348a: Computer Graphics Handout #9 Geometric Modeling Original Handout #9 Stanford University Tuesday, 3 November 992 Original Lecture #2: 6 October 992 Topics: Coordinates and Transformations Scribe:

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

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

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