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

Size: px
Start display at page:

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

Transcription

1 CSCI 4620/8626 Computer Graphics Clipping Algorithms (Chapter 8-5 ) Last update: Clipping Algorithms A clipping algorithm is any procedure that eliminates those portions of a picture outside a specified region of space (usually a rectangle in standard position). Considered here are 2D clipping algorithms for Points Lines (straight-line segments) Fill areas Curves Text 2 1

2 2D Point Clipping Point clipping is reasonably obvious. If the point s coordinates (x,y) satisfy the following inequalities, then it is inside the clipping region: xw min x xw max yw min y yw max If any of the inequalities is not met, then the point is dropped (clipped). 3 2D Line Clipping (1) Assume a rectangular clipping window in standard position and a line segment (i.e. two vertices). The results of a line clipping algorithm can be (1) the line is entirely outside the clipping window; or (2) the line is entirely inside the clipping window; or (3) the line intersects the clipping window boundary; part is inside and part is outside. The most expensive part of the algorithm deals with result (3), so we seek algorithms that minimize the work needed for that result. 4 2

3 2D Line Clipping (2) If both endpoints of a segment are inside the clipping window (e.g. P 1 -P 2 in Fig. 8-9), the segment is entirely in the clipping window. If both endpoints of a segment are outside any one of the four boundaries of the clipping window (e.g. P 3 -P 4 ), the segment is entirely outside the clipping window. (P 9 -P 10 doesn t fit this case!) Otherwise the segment may intersect the boundary of the clipping window and may extend into its interior. 5 Figure 8-9 Clipping straight-line segments using a standard rectangular clipping window. 3

4 2D Line Clipping (3) One way to determine where a line segment crosses a clipping window edge: Assume (x 0,y 0 ) and (x end,y end ) are the line segment endpoints. Use these parametric equations of the line: x x 0 u x end x 0 y y 0 u y end y 0 0 u 1 Sequentially substitute the x/y window boundary values (4 of them) for the x/y variables and solve for u. If u is in [0,1], then solve for y/x (the other variable). If it s in the allowed range for the clipping window, then we clip the line. 7 Clipping Efficiency (1) The basic clipping algorithm just discussed is straightforward, but inefficient. Recall that floating point arithmetic is vastly slower than integer arithmetic, and floating point division is enormously slower than addition. For example, on a 2.66GHz Intel Xeon 10 8 fp additions (or subtractions) took 515 msec 10 8 fp multiplications took 584 msec 10 8 fp divisions took 1168 msec 8 4

5 Clipping Efficiency (2) Since real images typically have many line segments, and clipping is done frequently, we must be concerned about the time required to perform the clipping operation. Many clipping algorithms do more initial testing to reduce the processing time for a set of line segments. Some of these are designed specifically for 2D pictures, while others can be easily adapted to 3D. 9 Cohen-Sutherland Line Clipping In this algorithm, each line endpoint is first classified by assigning it a 4-bit region code (sometimes called an out code). Think of an infinite line through a clipping window edge as separating the plane into two half-planes. Each bit of the region code identifies the half-plane in which a line endpoint lies. 0 is used if the endpoint lies in the half-plane that contains the clipping region ( inside half space). 1 is used if the endpoint lies in the half-plane that is outside the clipping region ( outside half space). 10 5

6 Figure 8-10 A possible ordering for the clipping window boundaries corresponding to the bit positions in the Cohen- Sutherland endpoint region code. Figure 8-11 The nine binary region codes for identifying the position of a line endpoint, relative to the clipping-window boundaries. 6

7 Setting the Region Code Bits It should be easy to see how the bits in the region code for a line segment s endpoint are set. For example, given the region code bit arrangement shown in figure 8-10, the value of bit 1 is the result of evaluating x xw min The other three bits in the region code are set in a similar manner. The bits are easily computed by keeping just the sign bits of the differences; for example, the sign bit of x xw min would be used for bit Simple Cases Once region codes are established, it s easy to determine which line segments are completely inside or outside the clipping window. Any line that is completely within the clipping window will have a region code of 0000 for each endpoint. Any line that is completely outside the clipping window will have endpoint region codes with 1 in the same bit position. 14 7

8 Simple Case Examples It should be easy to see why 0000 is associated with each endpoint of a segment within the clipping window. Imagine a line segment that begins to the left of the clipping window and extends to the upper left. Bit position 1 will be 1 for both endpoints, since each of them is in the half-plane to the left of the clipping window. Bit position 4 will be 0 in one endpoint and 1 in the other. 15 Implementation of Simple Cases If we do a bitwise OR operation on the two region codes and get 0000, then each region code must have been 0000, and the line segment is completely within the clipping region; keep it. If we do a bitwise AND operation on the two region codes and get a non-zero value, then one of the same bits in each region code must have been 1; discard the line segment as being completely outside the clipping region. Recall that zero/non-zero values are treated as false/true in C/C

9 Not So Simple Lines that can t be easily classified must be checked for intersection with the clipping window boundaries. This may require several intersection calculations. Note that a line segment can intersect several clipping window boundary lines (that is, cross between multiple of the half-planes) without necessarily entering the interior of the clipping window. 17 Figure 8-12 Lines extending from one clipping-window region to another may cross into the clipping window, or they could intersect one or more clipping boundaries without entering the window. 9

10 Does It Cross? To determine if a line segment crosses from one half-plane to another (and potentially into the clipping window), we examine the corresponding bit positions in the two region codes. If the value of the bits in corresponding positions differ, then the segment crosses the boundary line between the two half-planes. As each clipping-window edge is processed, a section of the line is clipped, and the remainder of the line is checked against the other borders. 19 Termination Conditions After each clip of a line segment, the modified segment is checked to see if it is totally inside or outside the clipping window. If so, we re done. Otherwise, the modified line segment is checked against the remaining clipping window borders. It is possible that an intersection position may be calculated at each of the four clipping boundaries, as illustrated in Figure (This is because the order in which boundaries are checked may not match the order in which the segment intersects the boundaries.) 20 10

11 Figure 8-13 Four intersection positions (labeled from 1 to 4) for a line segment that is clipped against the window boundaries in the order left, right, bottom, top. Boundary Intersections (1) It s relatively easy to determine a boundary intersection for a line segment. Given (x 0, y 0 ) and (x end, y end ) as the line endpoints, and x is the position of a vertical clipping border line (i.e. xw min or xw max ), compute the y coordinate of the intersection as follows: m y end y 0 / x end x 0 y y 0 m x x

12 Boundary Intersections (2) If we re looking for the intersection with a horizontal border, then the x coordinate can be calculated as follows (where y is yw min or yw max ): x x 0 y y 0 m 23 Liang-Barsky Line Clipping Cyrus and Beck, then later Liang and Barsky, developed faster line-clipping algorithms based on additional line testing using the parametric form for lines. Given the usual endpoint definitions, the line can be parametrically described as follows (same as before): 24 12

13 Combine with Point-Clipping Conditions Liang-Barsky then combines the parametric line equations with the point-clipping conditions seen earlier. This yields these four inequalities (given in pairs): xw min x 0 u x xw max yw min y 0 u y yw max 25 Rewriting the Inequalities The four inequalities can be rewritten like this: up k q k k 1,2,3,4 p and q are defined as 26 13

14 Example: p 1 and q 1 Derivation Let s consider one inequality: Subtract uδx from each side: Subtract xw min from each side: If we now define p 1 = -Δx and q 1 = x 0 xw min, we obtain the expression given for the first inequality: up 1 q 1 The remaining inequalities can be rewritten to yield the other cases for up k q k. 27 Cases to Consider If p k = 0, then the line is parallel to a boundary. If q k < 0 for the same k, then the line can be discarded. If q k 0 then the corresponding pointclipping inequality is satisfied. If p k < 0, then the segment potentially enters the clipping window across the k-th boundary; call this case PE. If p k > 0, then the segment potentially leaves the clipping window across the k-th boundary; call this case PL

15 Definitions Let K PE = { k : p k < 0 } denote the set of indices of clipping boundaries across which the line potentially enters the clip rectangle. Similarly let K PL = { k : p k > 0 } denote the set of indices of clipping boundaries across which the line potentially leaves the clip rectangle. Let u k = q k / p k represent the parameter value at the k-th boundary crossing. 29 Visible Segment With those definitions, the visible portion of the line segment is that where the parameter value u is in the range u min u u max where u min = max kîk PE [ ] u max = min [ ] 0,u k kîk PL 1,u k If u min > u max then the entire segment is clipped

16 Example of Liang-Barsky In the fullness of time there will be a slide or two that demonstrates Liang-Barsky with a specific set of lines and a specific clipping window. 31 Nicholl-Lee-Nicholl Line Clipping The Nicholl-Lee-Nicholl (NLN) line clipping algorithm creates more regions around the clipping window to avoid multiple line-intersection calculations, thus using fewer comparisons and divisions. The tradeoff is that Cohen-Sutherland and Liang- Barsky can be easily extended to three dimensions, but NLN cannot

17 NLN Rationale In general, a line segment (being clipped) can intersect all four of the (extended) clipping window boundaries (review fig. 8-13). At most two of these intersections are relevant to the clipping problem. We assume most of the computational overhead is associated with finding intersections, so it follows that irrelevant intersection computations should be avoided. Only three cases need to be considered. 33 NLN - Initial Testing Initially, a line s endpoints are assigned region codes as before. Then the easy tests to determine if the line is entirely inside or outside the clipping region are performed. Obviously we re done (as before) if one of the easy tests succeeds. Otherwise NLN proceeds to set up additional clipping regions

18 Endpoint Positions to Consider One of the endpoints (called P 0 ) of each line considered by NLN must be in one of three positions. That is, P 0 must have one of three region codes: 0000 = inside the clipping region 0001 = immediately left of the clipping region 1001 = left and above the clipping region If P 0 isn t in one of those regions, but P end is, then P 0 and P end can be swapped. The other endpoint positions can be mapped into one of the three positions by rotating the line and the clipping region by 90, 180, or 270 degrees or 180 or 270 CCW Rotation A 90, 180 or 270 counterclockwise rotation of a point (x,y) about the origin can be easily accomplished: For a 90 rotation, replace (x,y) with (-y,x) For a 180 rotation, replace (x,y) with (-x,y) For a 270 rotation, replace (x,y) with (-y,-x) So, for NLN, rotating the clipping region and the line segment (from P 0 to P end ) requires 12 assignments and some negations. We ll also need to do the reverse rotation after clipping is completed

19 Figure 8-14 Three possible positions for a line endpoint P 0 in the NLN line-clipping algorithm. NLN: P 0 inside the window If P 0 is inside the clipping window, and P end is outside, then four regions are defined as shown in figure These regions are defined by the semi-infinite lines beginning with P 0 and extending through the four vertices defining the corners of the clipping window. The region containing P 0 P end is easily identified by comparing the line s slope with the slopes of the lines bordering the regions (more later)

20 Figure 8-15 The four regions used in the NLN algorithm when P 0 is inside the clipping window and P end is outside. NLN: P 0 left of the window As before, four lines are drawn from P 0 through the vertices of the clipping window (see fig. 8-16). We now have four regions, labeled for the clipping window edges the line could intersect: L (inside the window), LT, LR, and LB. If P end is in L, it is easily identified by its region code (0000). The other regions are identified, as before, by comparing the slope of P 0 P end with the slopes of the region boundary lines

21 Figure 8-16 The four clipping regions used in the NLN algorithm when P 0 is directly to the left of the clip window. NLN: P 0 above left of the window The regions in this case depend on whether P 0 is closer to the (extended) left boundary edge or the top boundary edge of the clipping window. These two cases are shown in fig (a) and (b), along with the various regions they define; labeled for the edges the clipped line intersects. The region containing P end and therefore the edge(s) of the clipping window that are intersected is(are) identified by comparing the slope of P 0 P end with the slope of the boundary lines of the regions

22 Figure 8-17 The two possible sets of clipping regions used in the NLN algorithm when P 0 is above and to the left of the clipping window. Slopes Assume the line being clipped has endpoint coordinates (x 0,y 0 ) and (x end,y end ). The slope of this line is easily seen to be y end - y 0 x end - x 0 In the case illustrated in fig. 8-16, the slopes of the lines bounding the top regions (L and LT) are y T - y 0 y T - y and 0 x R - x 0 x L - x

23 Slope Comparisons If the line being clipped is in region L or LT, then we must have y T - y 0 y - y end 0 y - y T 0 x R - x 0 x end - x 0 x L - x 0 Look at the first (left) inequality (as an example). It can be rewritten as y T - y 0 ( )( x end - x 0 ) ( y end - y 0 )( x R - x 0 ) Note this involves no divisions! 45 Intersection Calculations Once the clipping window edge(s) that intersect the line being clipped is(are) identified, the intersection point can be determined using only a single division for each intersection. The coordinate difference calculations and product calculations used in the slope comparisons are saved and reused in the intersection calculations. Although only a single region was used here as an example, the work for other regions is very similar

24 Non-Rectangular Polygon Clip Windows Dealing with other polygonal (read as: with line-segment edges) clip windows can be done with methods like Cyrus- Beck or Liang-Barsky these use parametric forms for the line segments. To do this: First see if clip line endpoints are inside or outside a rectangular polygon that encloses the non-rectangular one (i.e. the bounding box). This can easily exclude lines that don t intersect. Represent the lines of the polygon boundary in parametric forms (in addition to the line being clipped). Solve for the parameter representing intersection of the line with the boundary; if not in [0,1], there is no intersection. Otherwise, we easily find part of the line to keep. Repeat as necessary. 47 Concave Polygonal Clip Windows As expected, we can use the parametric procedures for concave clip regions if we split them into several convex regions. Alternately, we can add one or more edges to the concave polygon to make it a convex polygon. Then a series of clipping operations can be done using the modified convex components

25 Figure 8-18 A concave- polygon clipping window (a), with vertex list (V 1, V 2, V 3, V 4, V 5 ), is modified to the convex polygon (V 1, V 2, V 3, V 4 ) in (b). The external segments of line P 1 P 2 are then snipped off using this convex clipping window. The resulting line segment, P' 1 P' 2, is next processed against the triangle (V 1, V 5, V 4 ) (c) to clip off the internal line segment P' 1 P'' 2 to produce the final clipped line P'' 1 P' 2. Nonlinear Clipping Window Boundaries We can (obviously) also use non-linear (not straight line segments) clipping window boundaries to clip against circular or curved clipping regions. Also (obviously) such clipping operations will be more costly (more computation)

26 Polygon Fill-Area Clipping As noted earlier, most graphics packages only support filling polygonal area, and then often only convex polygonal areas. A problem with clipping the boundary lines of such areas is that the resulting (clipped) lines may not represent a closed polygon, and therefore cannot have a fill algorithm applied to them. 51 Figure 8-19 A line-clipping algorithm applied to the line segments of the polygon boundary in (a) generates the unconnected set of lines in (b). 26

27 Polygon Fill Area: What s Needed? Traditional line clipping of a polyline against a clipping area may produce multiple non-connected line segments, as noted. What is needed is a procedure that will generate one or more closed polylines for the boundaries of the clipped fill area. The next slide (8-20) illustrates the proper clipping of a filled area. 53 Figure 8-20 Display of a correctly clipped polygon fill area. 27

28 Algorithm Basics As usual, the algorithm will clip each line of the polygon s border resulting in a new set of clipped endpoints at each clipping-window boundary. The fill area also needs to be maintained as a separate entity, determining the new shape for the polygon(s) as each clipping-window edge is processed. The next slide illustrates this idea. 55 Figure 8-21 Processing a polygon fill area against successive clippingwindow boundaries. 28

29 First, The Simple Cases The easiest cases to handle are those where we can immediately clip the entire filled area: Determine the rectangular area that encloses the object to be clipped (the bounding box all we need are the minimum and maximum coordinate extents). Then determine if the enclosing rectangle and the rectangular clipping area intersect. If these do not intersect, we toss out the entire filled object. Figure 8-22 illustrates this idea. 57 Figure 8-22 A polygon fill area with coordinate extents outside the right clipping boundary. 29

30 Otherwise If we can t discard it entirely, then we must process each edge of the polygon. One way is to use a separate clipper for each clipping window boundary, and have these clippers pass vertex lists along a pipeline. The result (output) of the final clipper is the vertex list for the clipped polygon (see the next slide). For concave polygons, multiple vertex lists may be generated. 59 Figure 8-23 A convex-polygon fill area (a), defined with the vertex list {1, 2, 3}, is clipped to produce the fill-area shape shown in (b), which is defined with the output vertex list {1', 2', 2'', 3', 3'', 1''}. 30

31 Sutherland-Hodgman Polygon Clipping This method has multiple stages, one for each clipping window boundary. Polygon vertices are sent through each clipping stage, with the output of one passed immediately to the next. The algorithm cannot handle all concave polygons, but can handle those that result in a single vertex list. 61 General Strategy Endpoint pairs for each successive polygon line segment sent through clippers (left, right, bottom, top). As soon as a clipper does its work, the clipped coordinate values (if any) are sent to the next clipper. Then the first clipper processes the next pair of endpoints. The individual clippers can operate in parallel, making for fast hardware implementation! 62 31

32 Four Cases As shown in the next slide (figure 8-24), there are four cases to consider for each clipping stage. Assume the two vertices being considered are named V 1 and V 2. Consider the position of these relative to a clipping window edge, not the whole window: V 1 outside, V 2 inside: intersection point (V 1 ) and V 2 passed on. V 1 inside, V 2 inside: only V 2 passed on. V 1 inside, V 2 outside: only the intersection point (V 1 ) is passed on. V 1 outside, V 2 outside: nothing is passed on. 63 Figure 8-24 The four possible outputs generated by the left clipper, depending on the position of a pair of endpoints relative to the left boundary of the clipping window. 32

33 Do It Now 2 2' 3 3' 2'' 1' 1 65 A Complete Example Consider this example: For the left clipping window edge: {1,2}: in, in: pass {2} {2,3}: in, out: pass {2 } {3,1}: out, in: pass {3,1} For the right clipping window edge: {2,2 }: in, in: pass {2 } {2,3 }: in, in: pass {3 } {3,1}: in, in: pass {1} {1,2}: in, in: pass {2} For the bottom clipping window edge: {2 } {2,3 }: in, out: pass {2 } {3,1}: out, out: pass { } {1,2}: out, in: pass {1,2} {2,2 }: in, in: pass {2 } ' 3' 2'' 1 Top Edge {2,1 }: in, in: pass {1 } {1,2}: in, in: pass {2} {2,2 }: in, in: pass {2 } 1' {2,2 }: in, in: pass 2 33

34 Figure 8-25 Processing a set of polygon vertices, {1, 2, 3}, through the boundary clippers using the Sutherland- Hodgman algorithm. The final set of clipped vertices is {1', 2, 2', 2''}. Concave Polygons As noted, Sutherland-Hodgman might be used for concave polygons. In some cases, however, extraneous lines may appear (see the next slide, figure 8-26). What to do? Split the concave polygon into two or more concave polygons, then use Sutherland-Hodgman on each. Check for multiple vertex positions on any clipping boundary, then separate into multiple vertex lists may require extensive analysis. Use a different algorithm designed for concave polygons! 68 34

35 Figure 8-26 Clipping the concave polygon in (a) using the Sutherland-Hodgman algorithm produces the two connected areas in (b). Weiler-Atherton Polygon Clipping Advantage 1: It can handle concave filled polygons! Advantage 2: It can clip a polygon against a polygonal clipping window! It was originally developed to identify visible surfaces in a 3D scene. Basic idea: trace around the perimeter of the polygon being clipped, searching for borders that enclose a clipped fill region. Thus the appropriate result (2 regions) would be found for the concave polygon in the previous slide

36 Prerequisites The processing direction (i.e. the order in which the vertices are visited) must be strictly CW or CCW. This means the vertices of the polygons should have been ordered appropriately. We must be able to identify when an edge of the polygon being clipped crosses to the outside of the clipping polygon. The cross-product of two successive edge vectors that form a convex angle can identify the front of the polygon (normal vector from back to front). 71 The Algorithm Part 1 (CCW) [1] Process edges of polygon being clipped in CCW order until inside-outside pair of vertices is encountered (at one of the clipping boundaries); first vertex is inside, second vertex is outside. [2] Follow clipping window boundaries CCW to another intersection with the polygon. If this was previously processed, go to step 3. Otherwise continue processing polygon edges until a previously processed vertex is encountered

37 The Algorithm Part 2 [3] Form the vertex list for this section of the clipped fill area [4] Return to the exit intersection point (found in step 2) and continue processing the polygon vertices in CCW order. 73 Illustration Rectangular Window On the next slide, a rectangular clipping window is used with a convex polygon. If we start at point 1, we detour around the clipping window at point 1, eventually returning to point 1 (giving vertices 1, 1, 1, and 1 ). Resuming from point 1, we visit 2, then 2. But this edge is outside the window, as is 2 3, and 3 4. From 4 we encounter the clipping window at 4 (4 4 outside the window), proceed to 5, detour to 5, then to 4 which ends the detour (giving 4, 5, 5 ). We resume at 5 and return to 1, which is the last of the vertices

38 Figure 8-27 A concave polygon (a), defined with the vertex list {1, 2, 3, 4, 5, 6}, is clipped using the Weiler-Atherton algorithm to generate the two lists {1, 1', 1'', 1'''} and {4', 5, 5'}, which represent the separate polygon fill areas shown in (b). Nonrectangular Polygon Clip Windows Parametric line clipping methods (e.g. Liang Barsky) are well-suited for processing polygon fill areas against convex-polygon clipping windows. Parametric representation of the edges of the fill area and the clipping window are used, each represented as a vertex list. The usual rectangular exclusion test is performed. Then pairs of simultaneous parametric equations are solved to find intersection points

39 Nonrectangular Windows (2) Inside-outside tests may be needed to determine if a fill-area vertex is inside or outside a particular clipping-window boundary. This approach can be used in constructive solidgeometry applications to identify the result of a union, intersection, or difference operation on two polygons. In particular, intersection == clipping! 77 Illustration Nonrectangular Window The next slide shows a CCW traversal with a nonrectangular clipping window. Starting at 1, the first inside->outside traversal is at the bottom of the clipped area (shown in green), where we detour (CCW again) around the clipping window s polygon. We eventually return to the point at the top of the clipped area. We then go to step 3 (to form the vertex list), then return to the bottom vertex and follow the polygon vertices, back to vertex

40 Figure 8-28 Clipping a polygon fill area against a concave-polygon clipping window using the Weiler-Atherton algorithm. Curve Clipping (1) Same procedures as with polygonal clipping when part of the curved object are line segments. For curved parts, non-linear equations must be used, and the intersection calculations are more difficult. To begin, however, the same exclusion tests used with polygons are employed. If the curved object is entirely outside the clipping region, then it is excluded! 80 40

41 Figure 8-29 A circle fill area, showing the quadrant and octant sections that are outside the clipping-window boundaries. Curve Clipping (2) Another technique, useful if the curved object has a regular geometry, is to use symmetry to simplify the calculation. In the example shown on the next slide, for example, much of the circle fill area (3 quadrants) is outside the clipping window. Once specific intersection positions are found, they are saved for later use by the scan-line fill procedures

42 Figure 8-30 Clipping a circle fill area. Figure 8-31 Text clipping using the coordinate extents for an entire string. 42

43 Figure 8-32 Text clipping using the bounding rectangle for individual characters in a string. Figure 8-33 Text clipping performed on the components of individual characters. 43

44 Table 8-1 Summary of OpenGL Two-Dimensional Viewing Functions Table 8-1 (continued) Summary of OpenGL Two-Dimensional Viewing Functions 44

45 Table 8-1 (continued) Summary of OpenGL Two-Dimensional Viewing Functions 45

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

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

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

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

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

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

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

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

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

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

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

3D Rendering Pipeline (for direct illumination)

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

More information

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

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

More information

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

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

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

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

More information

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

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

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

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

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

More information

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

Topics. From vertices to fragments

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

More information

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

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

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

More information

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

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

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

More information

(Refer Slide Time: 00:02:02)

(Refer Slide Time: 00:02:02) Computer Graphics Prof. Sukhendu Das Dept. of Computer Science and Engineering Indian Institute of Technology, Madras Lecture - 20 Clipping: Lines and Polygons Hello and welcome everybody to the lecture

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

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

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

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

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

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

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

Course Number: Course Title: Geometry

Course Number: Course Title: Geometry Course Number: 1206310 Course Title: Geometry RELATED GLOSSARY TERM DEFINITIONS (89) Altitude The perpendicular distance from the top of a geometric figure to its opposite side. Angle Two rays or two line

More information

Practical Linear Algebra: A Geometry Toolbox

Practical Linear Algebra: A Geometry Toolbox Practical Linear Algebra: A Geometry Toolbox Third edition Chapter 18: Putting Lines Together: Polylines and Polygons Gerald Farin & Dianne Hansford CRC Press, Taylor & Francis Group, An A K Peters Book

More information

Chapter 3. Sukhwinder Singh

Chapter 3. Sukhwinder Singh Chapter 3 Sukhwinder Singh PIXEL ADDRESSING AND OBJECT GEOMETRY Object descriptions are given in a world reference frame, chosen to suit a particular application, and input world coordinates are ultimately

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

A Procedure to Clip Line Segment

A Procedure to Clip Line Segment Vol.5, No.1 (2014), pp.9-20 http://dx.doi.org/10.14257/ijcg.2014.5.1.02 A Procedure to Clip Line Segment Bimal Kumar Ray School of Information Technology & Engineering VIT University, Vellore 632014, India

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

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

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

Computational Geometry. Geometry Cross Product Convex Hull Problem Sweep Line Algorithm

Computational Geometry. Geometry Cross Product Convex Hull Problem Sweep Line Algorithm GEOMETRY COMP 321 McGill University These slides are mainly compiled from the following resources. - Professor Jaehyun Park slides CS 97SI - Top-coder tutorials. - Programming Challenges books. Computational

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

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

RASTERIZING POLYGONS IN IMAGE SPACE

RASTERIZING POLYGONS IN IMAGE SPACE On-Line Computer Graphics Notes RASTERIZING POLYGONS IN IMAGE SPACE Kenneth I. Joy Visualization and Graphics Research Group Department of Computer Science University of California, Davis A fundamental

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

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

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

CS184 : Foundations of Computer Graphics Professor David Forsyth Final Examination

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

More information

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

Keywords Computer Graphics, Line Clipping, 2D geometry, 3D geometry.

Keywords Computer Graphics, Line Clipping, 2D geometry, 3D geometry. Volume 6, Issue 11, November 2016 ISSN: 2277 128X International Journal of Advanced Research in Computer Science and Software Engineering Research Paper Available online at: www.ijarcsse.com RJ - ASHI

More information

Graphics (Output) Primitives. Chapters 3 & 4

Graphics (Output) Primitives. Chapters 3 & 4 Graphics (Output) Primitives Chapters 3 & 4 Graphic Output and Input Pipeline Scan conversion converts primitives such as lines, circles, etc. into pixel values geometric description a finite scene area

More information

form are graphed in Cartesian coordinates, and are graphed in Cartesian coordinates.

form are graphed in Cartesian coordinates, and are graphed in Cartesian coordinates. Plot 3D Introduction Plot 3D graphs objects in three dimensions. It has five basic modes: 1. Cartesian mode, where surfaces defined by equations of the form are graphed in Cartesian coordinates, 2. cylindrical

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

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

Review for Mastery Using Graphs and Tables to Solve Linear Systems

Review for Mastery Using Graphs and Tables to Solve Linear Systems 3-1 Using Graphs and Tables to Solve Linear Systems A linear system of equations is a set of two or more linear equations. To solve a linear system, find all the ordered pairs (x, y) that make both equations

More information

Intersection of an Oriented Box and a Cone

Intersection of an Oriented Box and a Cone Intersection of an Oriented Box and a Cone David Eberly, Geometric Tools, Redmond WA 98052 https://www.geometrictools.com/ This work is licensed under the Creative Commons Attribution 4.0 International

More information

Number/Computation. addend Any number being added. digit Any one of the ten symbols: 0, 1, 2, 3, 4, 5, 6, 7, 8, or 9

Number/Computation. addend Any number being added. digit Any one of the ten symbols: 0, 1, 2, 3, 4, 5, 6, 7, 8, or 9 14 Number/Computation addend Any number being added algorithm A step-by-step method for computing array A picture that shows a number of items arranged in rows and columns to form a rectangle associative

More information

Lecture 25: Bezier Subdivision. And he took unto him all these, and divided them in the midst, and laid each piece one against another: Genesis 15:10

Lecture 25: Bezier Subdivision. And he took unto him all these, and divided them in the midst, and laid each piece one against another: Genesis 15:10 Lecture 25: Bezier Subdivision And he took unto him all these, and divided them in the midst, and laid each piece one against another: Genesis 15:10 1. Divide and Conquer If we are going to build useful

More information

CS 325 Computer Graphics

CS 325 Computer Graphics CS 325 Computer Graphics 02 / 06 / 2012 Instructor: Michael Eckmann Today s Topics Questions? Comments? Antialiasing Polygons Interior points Fill areas tiling halftoning dithering Antialiasing Aliasing

More information

SE Mock Online Test 1-CG

SE Mock Online Test 1-CG SE Mock Online Test 1-CG 1. Email address * 2. 1. For gentle slope line, slope m is -1

More information

4.5 VISIBLE SURFACE DETECTION METHODES

4.5 VISIBLE SURFACE DETECTION METHODES 4.5 VISIBLE SURFACE DETECTION METHODES A major consideration in the generation of realistic graphics displays is identifying those parts of a scene that are visible from a chosen viewing position. There

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

1.6 Classifying Polygons

1.6 Classifying Polygons www.ck12.org Chapter 1. Basics of Geometry 1.6 Classifying Polygons Learning Objectives Define triangle and polygon. Classify triangles by their sides and angles. Understand the difference between convex

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

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

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

Figure 1: A positive crossing

Figure 1: A positive crossing Notes on Link Universality. Rich Schwartz: In his 1991 paper, Ramsey Theorems for Knots, Links, and Spatial Graphs, Seiya Negami proved a beautiful theorem about linearly embedded complete graphs. These

More information

Question 2: How do you solve a linear programming problem with a graph?

Question 2: How do you solve a linear programming problem with a graph? Question : How do you solve a linear programming problem with a graph? Now that we have several linear programming problems, let s look at how we can solve them using the graph of the system of inequalities.

More information

3.3 Optimizing Functions of Several Variables 3.4 Lagrange Multipliers

3.3 Optimizing Functions of Several Variables 3.4 Lagrange Multipliers 3.3 Optimizing Functions of Several Variables 3.4 Lagrange Multipliers Prof. Tesler Math 20C Fall 2018 Prof. Tesler 3.3 3.4 Optimization Math 20C / Fall 2018 1 / 56 Optimizing y = f (x) In Math 20A, we

More information

Computer Graphics Prof. Sukhendu Das Dept. of Computer Science and Engineering Indian Institute of Technology, Madras Lecture - 14

Computer Graphics Prof. Sukhendu Das Dept. of Computer Science and Engineering Indian Institute of Technology, Madras Lecture - 14 Computer Graphics Prof. Sukhendu Das Dept. of Computer Science and Engineering Indian Institute of Technology, Madras Lecture - 14 Scan Converting Lines, Circles and Ellipses Hello everybody, welcome again

More information

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

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

More information

Answer Key: Three-Dimensional Cross Sections

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

More information

(Refer Slide Time: 00:02:00)

(Refer Slide Time: 00:02:00) Computer Graphics Prof. Sukhendu Das Dept. of Computer Science and Engineering Indian Institute of Technology, Madras Lecture - 18 Polyfill - Scan Conversion of a Polygon Today we will discuss the concepts

More information

Pick s Theorem and Lattice Point Geometry

Pick s Theorem and Lattice Point Geometry Pick s Theorem and Lattice Point Geometry 1 Lattice Polygon Area Calculations Lattice points are points with integer coordinates in the x, y-plane. A lattice line segment is a line segment that has 2 distinct

More information

Prime Time (Factors and Multiples)

Prime Time (Factors and Multiples) CONFIDENCE LEVEL: Prime Time Knowledge Map for 6 th Grade Math Prime Time (Factors and Multiples). A factor is a whole numbers that is multiplied by another whole number to get a product. (Ex: x 5 = ;

More information

Polygon Triangulation

Polygon Triangulation Polygon Triangulation Definition Simple Polygons 1. A polygon is the region of a plane bounded by a finite collection of line segments forming a simple closed curve. 2. Simple closed curve means a certain

More information

Mathematics Assessment Anchor Glossary Grades 3 & 4

Mathematics Assessment Anchor Glossary Grades 3 & 4 Mathematics Assessment Anchor Glossary Grades 3 & 4 The definitions for this glossary were taken from one or more of the following sources: Webster s Dictionary, various mathematics dictionaries, the PA

More information

Glossary of dictionary terms in the AP geometry units

Glossary of dictionary terms in the AP geometry units Glossary of dictionary terms in the AP geometry units affine linear equation: an equation in which both sides are sums of terms that are either a number times y or a number times x or just a number [SlL2-D5]

More information

Computational Geometry

Computational Geometry Casting a polyhedron CAD/CAM systems CAD/CAM systems allow you to design objects and test how they can be constructed Many objects are constructed used a mold Casting Casting A general question: Given

More information

MIT EECS 6.837, Teller and Durand 1

MIT EECS 6.837, Teller and Durand 1 MIT EECS 6.837, Teller and Durand 1 Clipping MIT EECS 6.837 Frédo Durand and Seth Teller Some slides and images courtesy of Leonard McMillan MIT EECS 6.837, Teller and Durand 2 Administrative Assignment

More information

SHAPE AND STRUCTURE. Shape and Structure. An explanation of Mathematical terminology

SHAPE AND STRUCTURE. Shape and Structure. An explanation of Mathematical terminology Shape and Structure An explanation of Mathematical terminology 2005 1 POINT A dot Dots join to make lines LINE A line is 1 dimensional (length) A line is a series of points touching each other and extending

More information

15. Clipping. Projection Transformation. Projection Matrix. Perspective Division

15. Clipping. Projection Transformation. Projection Matrix. Perspective Division 15. Clipping Procedures for eliminating all parts of primitives outside of the specified view volume are referred to as clipping algorithms or simply clipping This takes place as part of the Projection

More information

Windowing And Clipping (14 Marks)

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

More information

Mrs. Daniel s Geometry Vocab List

Mrs. Daniel s Geometry Vocab List Mrs. Daniel s Geometry Vocab List Geometry Definition: a branch of mathematics concerned with questions of shape, size, relative position of figures, and the properties of space. Reflectional Symmetry

More information

Intro to Modeling Modeling in 3D

Intro to Modeling Modeling in 3D Intro to Modeling Modeling in 3D Polygon sets can approximate more complex shapes as discretized surfaces 2 1 2 3 Curve surfaces in 3D Sphere, ellipsoids, etc Curved Surfaces Modeling in 3D ) ( 2 2 2 2

More information

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

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

More information

(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

MATH DICTIONARY. Number Sense. Number Families. Operations. Counting (Natural) Numbers The numbers we say when we count. Example: {0, 1, 2, 3, 4 }

MATH DICTIONARY. Number Sense. Number Families. Operations. Counting (Natural) Numbers The numbers we say when we count. Example: {0, 1, 2, 3, 4 } Number Sense Number Families MATH DICTIONARY Counting (Natural) Numbers The numbers we say when we count Example: {1, 2, 3, 4 } Whole Numbers The counting numbers plus zero Example: {0, 1, 2, 3, 4 } Positive

More information

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

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

More information

Indirect measure the measurement of an object through the known measure of another object.

Indirect measure the measurement of an object through the known measure of another object. Indirect measure the measurement of an object through the known measure of another object. M Inequality a sentence that states one expression is greater than, greater than or equal to, less than, less

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

Polar Coordinates. 2, π and ( )

Polar Coordinates. 2, π and ( ) Polar Coordinates Up to this point we ve dealt exclusively with the Cartesian (or Rectangular, or x-y) coordinate system. However, as we will see, this is not always the easiest coordinate system to work

More information

Sung-Eui Yoon ( 윤성의 )

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

More information

Chapter - 2: Geometry and Line Generations

Chapter - 2: Geometry and Line Generations Chapter - 2: Geometry and Line Generations In Computer graphics, various application ranges in different areas like entertainment to scientific image processing. In defining this all application mathematics

More information

Multivariate Calculus Review Problems for Examination Two

Multivariate Calculus Review Problems for Examination Two Multivariate Calculus Review Problems for Examination Two Note: Exam Two is on Thursday, February 28, class time. The coverage is multivariate differential calculus and double integration: sections 13.3,

More information

(Refer Slide Time 03:00)

(Refer Slide Time 03:00) Computer Graphics Prof. Sukhendu Das Dept. of Computer Science and Engineering Indian Institute of Technology, Madras Lecture #30 Visible Surface Detection (Contd ) We continue the discussion on Visible

More information