Shading Triangles. Lecture 37. Robb T. Koether. Hampden-Sydney College. Mon, Nov 30, 2015

Size: px
Start display at page:

Download "Shading Triangles. Lecture 37. Robb T. Koether. Hampden-Sydney College. Mon, Nov 30, 2015"

Transcription

1 Shading Triangles Lecture 37 Robb T. Koether Hampden-Sydney College Mon, Nov 30, 2015 Robb T. Koether (Hampden-Sydney College) Shading Triangles Mon, Nov 30, / 35

2 Outline 1 Shading Triangles Barycentric Coordinates Vector Interpretation 2 An Example Fast Interpolation 3 Comparison with OpenGL 4 Assignment Robb T. Koether (Hampden-Sydney College) Shading Triangles Mon, Nov 30, / 35

3 Outline 1 Shading Triangles Barycentric Coordinates Vector Interpretation 2 An Example Fast Interpolation 3 Comparison with OpenGL 4 Assignment Robb T. Koether (Hampden-Sydney College) Shading Triangles Mon, Nov 30, / 35

4 Shading Triangles When a triangle is defined, each vertex is given a shade. Either Robb T. Koether (Hampden-Sydney College) Shading Triangles Mon, Nov 30, / 35

5 Shading Triangles When a triangle is defined, each vertex is given a shade. Either The RGB values are stored per vertex in the VAO, or Robb T. Koether (Hampden-Sydney College) Shading Triangles Mon, Nov 30, / 35

6 Shading Triangles When a triangle is defined, each vertex is given a shade. Either The RGB values are stored per vertex in the VAO, or The function glvertexattrib*() assigns a color to all three vertices, or Robb T. Koether (Hampden-Sydney College) Shading Triangles Mon, Nov 30, / 35

7 Shading Triangles When a triangle is defined, each vertex is given a shade. Either The RGB values are stored per vertex in the VAO, or The function glvertexattrib*() assigns a color to all three vertices, or The vertex shader calculates the shade. Robb T. Koether (Hampden-Sydney College) Shading Triangles Mon, Nov 30, / 35

8 Shading Triangles When a triangle is defined, each vertex is given a shade. Either The RGB values are stored per vertex in the VAO, or The function glvertexattrib*() assigns a color to all three vertices, or The vertex shader calculates the shade. In any case, primitive assembly occurs between the vertex shader and the fragment shader. Robb T. Koether (Hampden-Sydney College) Shading Triangles Mon, Nov 30, / 35

9 Shading Triangles When a triangle is defined, each vertex is given a shade. Either The RGB values are stored per vertex in the VAO, or The function glvertexattrib*() assigns a color to all three vertices, or The vertex shader calculates the shade. In any case, primitive assembly occurs between the vertex shader and the fragment shader. At the time of primitive assembly, the three vertices have been assigned shades. Robb T. Koether (Hampden-Sydney College) Shading Triangles Mon, Nov 30, / 35

10 Shading Triangles When a triangle is defined, each vertex is given a shade. Either The RGB values are stored per vertex in the VAO, or The function glvertexattrib*() assigns a color to all three vertices, or The vertex shader calculates the shade. In any case, primitive assembly occurs between the vertex shader and the fragment shader. At the time of primitive assembly, the three vertices have been assigned shades. As a consequence, the shades of the three vertices are interpolated across the interior of the triangle. Robb T. Koether (Hampden-Sydney College) Shading Triangles Mon, Nov 30, / 35

11 Outline 1 Shading Triangles Barycentric Coordinates Vector Interpretation 2 An Example Fast Interpolation 3 Comparison with OpenGL 4 Assignment Robb T. Koether (Hampden-Sydney College) Shading Triangles Mon, Nov 30, / 35

12 Barycentric Coordinates Every point in the plane may be expressed uniquely in barycentric coordinates based on the vertices of a triangle ABC. Let A = (a 1, a 2 ), B = (b 1, b 2 ), C = (c 1, c 2 ). Let P = (x, y) be a point in the plane. The barycentric coordinates (p, q, r) of P are determined by the equations pa + qb + rc = P p + q + r = 1. Robb T. Koether (Hampden-Sydney College) Shading Triangles Mon, Nov 30, / 35

13 Barycentric Coordinates For an arbitrary triangle ABC, to solve for p, q, and r, we use the system of equations pa 1 + qb 1 + rc 1 = x pa 2 + qb 2 + rc 2 = y p + q + r = 1. The solution is guaranteed to be unique, provided that A, B, and C are not collinear. Robb T. Koether (Hampden-Sydney College) Shading Triangles Mon, Nov 30, / 35

14 Shading Triangles Consider the following triangle ABC. C(5, 10) A(0, 0) B(15, 0) Robb T. Koether (Hampden-Sydney College) Shading Triangles Mon, Nov 30, / 35

15 Barycentric Coordinates Example Let A = (0, 0), B = (15, 0), C = (5, 10), as in the diagram, and let P = (6, 6). Then 15q + 5r = 6 10r = 6 p + q + r = 1. The solution is p = 1 5, q = 1 5, r = 3 5. Robb T. Koether (Hampden-Sydney College) Shading Triangles Mon, Nov 30, / 35

16 Barycentric Coordinates C(0, 0, 1) P(1/5, 1/5, 3/5) A(1, 0, 0) B(0, 1, 0) Robb T. Koether (Hampden-Sydney College) Shading Triangles Mon, Nov 30, / 35

17 Outline 1 Shading Triangles Barycentric Coordinates Vector Interpretation 2 An Example Fast Interpolation 3 Comparison with OpenGL 4 Assignment Robb T. Koether (Hampden-Sydney College) Shading Triangles Mon, Nov 30, / 35

18 Vector Interpretation Let A serve as the origin and form the vectors u = B A and v = C A. C(5, 10) v = (5, 10) A(0, 0) u = (15, 0) B(15, 0) Robb T. Koether (Hampden-Sydney College) Shading Triangles Mon, Nov 30, / 35

19 Vector Interpretation Then any point within the triangle (or anywhere in the plane) may be expressed as a unique linear combination of u and v. C(5, 10) v = (5, 10) P(6, 6) A(0, 0) u = (15, 0) B(15, 0) Robb T. Koether (Hampden-Sydney College) Shading Triangles Mon, Nov 30, / 35

20 Vector Interpretation We have P A = 1 5 u v. Robb T. Koether (Hampden-Sydney College) Shading Triangles Mon, Nov 30, / 35

21 Vector Interpretation These coefficients add up to 4 5, leaving = 1 5 coefficient of A. That is, P = 1 5 A B C. These are the barycentric coordinates again. left over as the Robb T. Koether (Hampden-Sydney College) Shading Triangles Mon, Nov 30, / 35

22 Outline 1 Shading Triangles Barycentric Coordinates Vector Interpretation 2 An Example Fast Interpolation 3 Comparison with OpenGL 4 Assignment Robb T. Koether (Hampden-Sydney College) Shading Triangles Mon, Nov 30, / 35

23 Shading the Triangle Let the vertices be red, yellow, and blue. C(1, 1, 0) A(1, 0, 0) B(0, 0, 1) Robb T. Koether (Hampden-Sydney College) Shading Triangles Mon, Nov 30, / 35

24 Shading the Triangle Every pixel is shaded in proportion to its barycentric coordinates. That is, if P = pa + qb + rc, then the shade of P is the same linear combination of the shades of A, B, and C. For example, the point (6, 6) would be shaded 1 5 (1, 0, 0) (0, 0, 1) (1, 1, 0) = ( 4 5, 3 5, 1 ) 5 = (0.8, 0.6, 0.2). Robb T. Koether (Hampden-Sydney College) Shading Triangles Mon, Nov 30, / 35

25 Outline 1 Shading Triangles Barycentric Coordinates Vector Interpretation 2 An Example Fast Interpolation 3 Comparison with OpenGL 4 Assignment Robb T. Koether (Hampden-Sydney College) Shading Triangles Mon, Nov 30, / 35

26 The Change in Shade It will be simpler to start at a vertex and apply changes in shade since the horizontal change in shade is constant and the vertical change in shade is constant. Robb T. Koether (Hampden-Sydney College) Shading Triangles Mon, Nov 30, / 35

27 The Change in Shade The barycentric coordinates of A are (1, 0, 0). If we move one unit to the right from A, the barycentric coordinates are ( 14 15, 0, 15) 1. This represents a change in barycentric coordinates of ( 1 15, 0, 15) 1. Robb T. Koether (Hampden-Sydney College) Shading Triangles Mon, Nov 30, / 35

28 The Change in Shade Apply that change to the shades of the vertices and we get a change in shade of 1 15 (1, 0, 0) + 0 (1, 1, 0) (0, 0, 1) = ( 1 15, 0, 1 15). Robb T. Koether (Hampden-Sydney College) Shading Triangles Mon, Nov 30, / 35

29 The Change in Shade Similarly, if we move one unit up from A, the barycentric coordinates are ( 14 15, 1 10, 30) 1. This represents a change in barycentric coordinates of ( 1 15, 1 10, 30) 1. Robb T. Koether (Hampden-Sydney College) Shading Triangles Mon, Nov 30, / 35

30 The Change in Shade Apply that change to the shades of the vertices and we get a change in shade of 1 15 (1, 0, 0) (1, 1, 0) 30 (0, 0, 1) = ( 1 30, 1 10, 30) 1. Robb T. Koether (Hampden-Sydney College) Shading Triangles Mon, Nov 30, / 35

31 The Change in Shade Expressed in 255ths, the changes are To the right: ( 17, 0, 17) Upward: ( 8 1 2, , 8 ) 1 2 Next, we find the shade of the lower-left pixel ( 1 2 above and 1 2 to the right of A). Then we apply the above changes as we move left and up to the other pixels. Robb T. Koether (Hampden-Sydney College) Shading Triangles Mon, Nov 30, / 35

32 Shading the Bottom Row The lower-left pixel has coordinates ( 1 2, 2) 1. Therefore, the change in shade from A, expressed in 255ths, is 1 2 ( 17, 0, 17) + 1 ( , , 8 1 ) ( 2 = 4 1 4, , 4 4) 1. Thus, the shade is ( , , 4 1 4), or (251, 13, 4). Robb T. Koether (Hampden-Sydney College) Shading Triangles Mon, Nov 30, / 35

33 Shading the Bottom Row Interpolate the shade of the leftmost pixel. C(1, 1, 0) (250¾, 12¾, 4¼) A(1, 0, 0) B(0, 0, 1) Robb T. Koether (Hampden-Sydney College) Shading Triangles Mon, Nov 30, / 35

34 Shading the Bottom Row Now we can easily compute the shades of the rest of the pixels in the bottom row by applying the change ( 17, 0, 17). Robb T. Koether (Hampden-Sydney College) Shading Triangles Mon, Nov 30, / 35

35 Shading the Bottom Row Interpolate the shade of the leftmost pixel. C(1, 1, 0) (250¾, 12¾, 4¼) A(1, 0, 0) B(0, 0, 1) (233¾, 12¾, 21¼) (216¾, 12¾, 38¼) Robb T. Koether (Hampden-Sydney College) Shading Triangles Mon, Nov 30, / 35

36 Shading the Rest of the Triangle Using the vertical change, the shade of the first pixel on the second row, in 255ths, is ( , , 21 1 ) ( , , 8 1 ) ( 2 = , , ). So its shade is (242, 38, 13). Fill in the remainder of the second row as we did in the first row, using ( 17, 0, 17). Robb T. Koether (Hampden-Sydney College) Shading Triangles Mon, Nov 30, / 35

37 Shading the Rest of the Triangle C(1, 1, 0) (242¼, 38¼, 12¾) A(1, 0, 0) B(0, 0, 1) (233¾, 12¾, 21¼) (225¼, 38¼, 46¾) Interpolate the shade of the leftmost pixel Robb T. Koether (Hampden-Sydney College) Shading Triangles Mon, Nov 30, / 35

38 Shading the Rest of the Triangle C(1, 1, 0) (250¾, 63¾, 21¼) A(1, 0, 0) B(0, 0, 1) Continue in the same manner throughout the remaining rows Robb T. Koether (Hampden-Sydney College) Shading Triangles Mon, Nov 30, / 35

39 Shading the Rest of the Triangle C(1, 1, 0) (242¼, 89¼, 12¾) A(1, 0, 0) B(0, 0, 1) Interpolate and shade the row Robb T. Koether (Hampden-Sydney College) Shading Triangles Mon, Nov 30, / 35

40 Shading the Rest of the Triangle C(1, 1, 0) (250¾, 114¾, 21¼) A(1, 0, 0) B(0, 0, 1) Interpolate and shade the row Robb T. Koether (Hampden-Sydney College) Shading Triangles Mon, Nov 30, / 35

41 Shading the Rest of the Triangle C(1, 1, 0) (242¼, 140¼, 12¾) A(1, 0, 0) B(0, 0, 1) Interpolate and shade the row Robb T. Koether (Hampden-Sydney College) Shading Triangles Mon, Nov 30, / 35

42 Shading the Rest of the Triangle (250¾, 165¾, 21¼) C(1, 1, 0) A(1, 0, 0) B(0, 0, 1) Interpolate and shade the row Robb T. Koether (Hampden-Sydney College) Shading Triangles Mon, Nov 30, / 35

43 Shading the Rest of the Triangle C(1, 1, 0) (242¼, 191¼, 12¾) A(1, 0, 0) B(0, 0, 1) Interpolate and shade the row Robb T. Koether (Hampden-Sydney College) Shading Triangles Mon, Nov 30, / 35

44 Shading the Rest of the Triangle (250¾, 216¾, 21¼) C(1, 1, 0) A(1, 0, 0) B(0, 0, 1) Interpolate and shade the row Robb T. Koether (Hampden-Sydney College) Shading Triangles Mon, Nov 30, / 35

45 Shading the Rest of the Triangle C(1, 1, 0) A(1, 0, 0) B(0, 0, 1) Interpolate and shade the row Robb T. Koether (Hampden-Sydney College) Shading Triangles Mon, Nov 30, / 35

46 Shading the Rest of the Triangle Just the triangle Robb T. Koether (Hampden-Sydney College) Shading Triangles Mon, Nov 30, / 35

47 Outline 1 Shading Triangles Barycentric Coordinates Vector Interpretation 2 An Example Fast Interpolation 3 Comparison with OpenGL 4 Assignment Robb T. Koether (Hampden-Sydney College) Shading Triangles Mon, Nov 30, / 35

48 Compare to OpenGL Here is a screen shot of the same triangle, shaded by OpenGL. Robb T. Koether (Hampden-Sydney College) Shading Triangles Mon, Nov 30, / 35

49 Compare to the Demo Here is a screen shot of the same triangle, shaded by the my demo program. Robb T. Koether (Hampden-Sydney College) Shading Triangles Mon, Nov 30, / 35

50 Outline 1 Shading Triangles Barycentric Coordinates Vector Interpretation 2 An Example Fast Interpolation 3 Comparison with OpenGL 4 Assignment Robb T. Koether (Hampden-Sydney College) Shading Triangles Mon, Nov 30, / 35

51 Assignment Assignment Add animation to the Canal Boat program. Animate the paddles (upper and lower) to open and close. Animate the gates (upper and lower) to open and close. Animate the boat to move upstream and downstream. The water level in the lock should rise and fall as a logical consequence of the status of the gates and paddles. Disallow any combination that would allow the water to flow straight through the lock. Include in the text window instructions telling which F-keys control the animation. This work is due by Monday, December 7. Robb T. Koether (Hampden-Sydney College) Shading Triangles Mon, Nov 30, / 35

The Critical-Path Algorithm

The Critical-Path Algorithm The Critical-Path Algorithm Lecture 32 Sections 8.3-8.4 Robb T. Koether Hampden-Sydney College Wed, Nov 19, 2014 Robb T. Koether (Hampden-Sydney College) The Critical-Path Algorithm Wed, Nov 19, 2014 1

More information

The Graphics Pipeline

The Graphics Pipeline The Graphics Pipeline Lecture 2 Robb T. Koether Hampden-Sydney College Fri, Aug 28, 2015 Robb T. Koether (Hampden-Sydney College) The Graphics Pipeline Fri, Aug 28, 2015 1 / 19 Outline 1 Vertices 2 The

More information

The Graphics Pipeline

The Graphics Pipeline The Graphics Pipeline Lecture 2 Robb T. Koether Hampden-Sydney College Wed, Aug 23, 2017 Robb T. Koether (Hampden-Sydney College) The Graphics Pipeline Wed, Aug 23, 2017 1 / 19 Outline 1 Vertices 2 The

More information

Shader Programs. Lecture 30 Subsections 2.8.2, Robb T. Koether. Hampden-Sydney College. Wed, Nov 16, 2011

Shader Programs. Lecture 30 Subsections 2.8.2, Robb T. Koether. Hampden-Sydney College. Wed, Nov 16, 2011 Shader Programs Lecture 30 Subsections 2.8.2, 2.8.3 Robb T. Koether Hampden-Sydney College Wed, Nov 16, 2011 Robb T. Koether (Hampden-Sydney College) Shader Programs Wed, Nov 16, 2011 1 / 43 Outline 1

More information

Mipmaps. Lecture 35. Robb T. Koether. Hampden-Sydney College. Wed, Nov 18, 2015

Mipmaps. Lecture 35. Robb T. Koether. Hampden-Sydney College. Wed, Nov 18, 2015 Mipmaps Lecture 35 Robb T. Koether Hampden-Sydney College Wed, Nov 18, 2015 Robb T. Koether (Hampden-Sydney College) Mipmaps Wed, Nov 18, 2015 1 / 31 Outline 1 Discrete Sampling 2 Mipmaps 3 Generating

More information

Magnification and Minification

Magnification and Minification Magnification and Minification Lecture 30 Robb T. Koether Hampden-Sydney College Fri, Nov 6, 2015 Robb T. Koether (Hampden-Sydney College) Magnification and Minification Fri, Nov 6, 2015 1 / 17 Outline

More information

Ambient and Diffuse Light

Ambient and Diffuse Light Ambient and Diffuse Light Lecture 20 Robb T. Koether Hampden-Sydney College Mon, Oct 12, 2015 Robb T. Koether (Hampden-Sydney College) Ambient and Diffuse Light Mon, Oct 12, 2015 1 / 29 Outline 1 Lighting

More information

The Projection Matrix

The Projection Matrix The Projection Matrix Lecture 8 Robb T. Koether Hampden-Sydney College Fri, Sep 11, 2015 Robb T. Koether (Hampden-Sydney College) The Projection Matrix Fri, Sep 11, 2015 1 / 43 Outline 1 Coordinate Systems

More information

Scheduling and Digraphs

Scheduling and Digraphs Scheduling and Digraphs Lecture 35 Sections 8.1, 8.2 Robb T. Koether Hampden-Sydney College Mon, Nov 21, 2016 Robb T. Koether (Hampden-Sydney College) Scheduling and Digraphs Mon, Nov 21, 2016 1 / 25 1

More information

The Traveling Salesman Problem Brute Force Method

The Traveling Salesman Problem Brute Force Method The Traveling Salesman Problem Brute Force Method Lecture 30 Sections 6.1, 6.3 Robb T. Koether Hampden-Sydney College Fri, Nov 3, 2017 Robb T. Koether (Hampden-Sydney College)The Traveling Salesman Problem

More information

Minimal Spanning Trees

Minimal Spanning Trees Minimal Spanning Trees Lecture 33 Sections 7.1-7.3 Robb T. Koether Hampden-Sydney College Wed, Apr 11, 20 Robb T. Koether (Hampden-Sydney College) Minimal Spanning Trees Wed, Apr 11, 20 1 / 17 1 Networks

More information

Scope and Parameter Passing

Scope and Parameter Passing Scope and Parameter Passing Lecture 16 Sections 6.5, 6.10, 6.13 Robb T. Koether Hampden-Sydney College Mon, Oct 7, 2013 Robb T. Koether (Hampden-Sydney College) Scope and Parameter Passing Mon, Oct 7,

More information

The Pairwise-Comparison Method

The Pairwise-Comparison Method The Pairwise-Comparison Method Lecture 10 Section 1.5 Robb T. Koether Hampden-Sydney College Mon, Sep 11, 2017 Robb T. Koether (Hampden-Sydney College) The Pairwise-Comparison Method Mon, Sep 11, 2017

More information

Recursive Sequences. Lecture 24 Section 5.6. Robb T. Koether. Hampden-Sydney College. Wed, Feb 27, 2013

Recursive Sequences. Lecture 24 Section 5.6. Robb T. Koether. Hampden-Sydney College. Wed, Feb 27, 2013 Recursive Sequences Lecture 24 Section 5.6 Robb T. Koether Hampden-Sydney College Wed, Feb 27, 2013 Robb T. Koether (Hampden-Sydney College) Recursive Sequences Wed, Feb 27, 2013 1 / 21 1 Recursive Sequences

More information

Recursive Sequences. Lecture 24 Section 5.6. Robb T. Koether. Hampden-Sydney College. Wed, Feb 26, 2014

Recursive Sequences. Lecture 24 Section 5.6. Robb T. Koether. Hampden-Sydney College. Wed, Feb 26, 2014 Recursive Sequences Lecture 24 Section 5.6 Robb T. Koether Hampden-Sydney College Wed, Feb 26, 2014 Robb T. Koether (Hampden-Sydney College) Recursive Sequences Wed, Feb 26, 2014 1 / 26 1 Recursive Sequences

More information

The Projection Matrix

The Projection Matrix The Projection Matrix Lecture 5 Robb T. Koether Hampden-Sydney College Wed, Aug 30, 2017 Robb T. Koether (Hampden-Sydney College) The Projection Matrix Wed, Aug 30, 2017 1 / 21 Outline 1 The World Coordinate

More information

Applying Textures. Lecture 27. Robb T. Koether. Hampden-Sydney College. Fri, Nov 3, 2017

Applying Textures. Lecture 27. Robb T. Koether. Hampden-Sydney College. Fri, Nov 3, 2017 Applying Textures Lecture 27 Robb T. Koether Hampden-Sydney College Fri, Nov 3, 2017 Robb T. Koether (Hampden-Sydney College) Applying Textures Fri, Nov 3, 2017 1 / 24 Outline 1 Applying Textures 2 Photographs

More information

Recursive Descent Parsers

Recursive Descent Parsers Recursive Descent Parsers Lecture 7 Robb T. Koether Hampden-Sydney College Wed, Jan 28, 2015 Robb T. Koether (Hampden-Sydney College) Recursive Descent Parsers Wed, Jan 28, 2015 1 / 18 1 Parsing 2 LL Parsers

More information

Rotations and Translations

Rotations and Translations Rotations and Translations Lecture 33 Sections 11.3-11.4 Robb T. Koether Hampden-Sydney College Wed, Nov 20, 2013 Robb T. Koether (Hampden-Sydney College) Rotations and Translations Wed, Nov 20, 2013 1

More information

Total Orders. Lecture 41 Section 8.5. Robb T. Koether. Hampden-Sydney College. Mon, Apr 8, 2013

Total Orders. Lecture 41 Section 8.5. Robb T. Koether. Hampden-Sydney College. Mon, Apr 8, 2013 Total Orders Lecture 41 Section 8.5 Robb T. Koether Hampden-Sydney College Mon, Apr 8, 2013 Robb T. Koether (Hampden-Sydney College) Total Orders Mon, Apr 8, 2013 1 / 30 1 Total Orders 2 Topological Sorting

More information

Stack Applications. Lecture 25 Sections Robb T. Koether. Hampden-Sydney College. Mon, Mar 30, 2015

Stack Applications. Lecture 25 Sections Robb T. Koether. Hampden-Sydney College. Mon, Mar 30, 2015 Stack Applications Lecture 25 Sections 18.7-18.8 Robb T. Koether Hampden-Sydney College Mon, Mar 30, 2015 Robb T. Koether Hampden-Sydney College) Stack Applications Mon, Mar 30, 2015 1 / 34 1 The Triangle

More information

Sampling Distribution Examples Sections 15.4, 15.5

Sampling Distribution Examples Sections 15.4, 15.5 Sampling Distribution Examples Sections 15.4, 15.5 Lecture 27 Robb T. Koether Hampden-Sydney College Wed, Mar 2, 2016 Robb T. Koether (Hampden-Sydney College)Sampling Distribution ExamplesSections 15.4,

More information

The Normal Distribution

The Normal Distribution The Normal Distribution Lecture 20 Section 6.3.1 Robb T. Koether Hampden-Sydney College Wed, Sep 28, 2011 Robb T. Koether (Hampden-Sydney College) The Normal Distribution Wed, Sep 28, 2011 1 / 41 Outline

More information

The Traveling Salesman Problem Nearest-Neighbor Algorithm

The Traveling Salesman Problem Nearest-Neighbor Algorithm The Traveling Salesman Problem Nearest-Neighbor Algorithm Lecture 31 Sections 6.4 Robb T. Koether Hampden-Sydney College Fri, Apr 6, 2018 Robb T. Koether (Hampden-Sydney College)The Traveling Salesman

More information

Recursion. Lecture 26 Sections , Robb T. Koether. Hampden-Sydney College. Mon, Apr 6, 2015

Recursion. Lecture 26 Sections , Robb T. Koether. Hampden-Sydney College. Mon, Apr 6, 2015 Recursion Lecture 26 Sections 14.1-14.5, 14.7 Robb T. Koether Hampden-Sydney College Mon, Apr 6, 2015 Robb T. Koether (Hampden-Sydney College) Recursion Mon, Apr 6, 2015 1 / 18 1 Recursion 2 Advantages

More information

The Decreasing-Time Algorithm

The Decreasing-Time Algorithm The Decreasing-Time Algorithm Lecture 36 Sections 8.4 Robb T. Koether Hampden-Sydney College Wed, Apr 18, 2018 Robb T. Koether (Hampden-Sydney College) The Decreasing-Time Algorithm Wed, Apr 18, 2018 1

More information

The Class Construct Part 1

The Class Construct Part 1 The Class Construct Part 1 Lecture 23 Sections 7.5-7.6 Robb T. Koether Hampden-Sydney College Fri, Oct 26, 2018 Robb T. Koether (Hampden-Sydney College) The Class Construct Part 1 Fri, Oct 26, 2018 1 /

More information

while Loops Lecture 13 Sections Robb T. Koether Wed, Sep 26, 2018 Hampden-Sydney College

while Loops Lecture 13 Sections Robb T. Koether Wed, Sep 26, 2018 Hampden-Sydney College while Loops Lecture 13 Sections 5.8-5.9 Robb T. Koether Hampden-Sydney College Wed, Sep 26, 2018 Robb T. Koether (Hampden-Sydney College) while Loops Wed, Sep 26, 2018 1 / 25 1 while Loops 2 Input Loops

More information

The Coefficient of Determination

The Coefficient of Determination The Coefficient of Determination Lecture 46 Section 13.9 Robb T. Koether Hampden-Sydney College Wed, Apr 17, 2012 Robb T. Koether (Hampden-Sydney College) The Coefficient of Determination Wed, Apr 17,

More information

Specular Reflection. Lecture 19. Robb T. Koether. Hampden-Sydney College. Wed, Oct 4, 2017

Specular Reflection. Lecture 19. Robb T. Koether. Hampden-Sydney College. Wed, Oct 4, 2017 Specular Reflection Lecture 19 Robb T. Koether Hampden-Sydney College Wed, Oct 4, 2017 Robb T. Koether (Hampden-Sydney College) Specular Reflection Wed, Oct 4, 2017 1 / 22 Outline 1 Specular Reflection

More information

Scope and Parameter Passing

Scope and Parameter Passing Scope and Parameter Passing Lecture 17 Sections 6.5, 6.10, 6.13 Robb T. Koether Hampden-Sydney College Fri, Oct 5, 2018 Robb T. Koether (Hampden-Sydney College) Scope and Parameter Passing Fri, Oct 5,

More information

Stack Applications. Lecture 27 Sections Robb T. Koether. Hampden-Sydney College. Wed, Mar 29, 2017

Stack Applications. Lecture 27 Sections Robb T. Koether. Hampden-Sydney College. Wed, Mar 29, 2017 Stack Applications Lecture 27 Sections 18.7-18.8 Robb T. Koether Hampden-Sydney College Wed, Mar 29, 2017 Robb T. Koether Hampden-Sydney College) Stack Applications Wed, Mar 29, 2017 1 / 27 1 Function

More information

Programming Languages

Programming Languages Programming Languages Lecture 3 Section 1.3 Robb T. Koether Hampden-Sydney College Mon, Sep 2, 2013 Robb T. Koether (Hampden-Sydney College) Programming Languages Mon, Sep 2, 2013 1 / 25 1 Programming

More information

Solving Recursive Sequences by Iteration

Solving Recursive Sequences by Iteration Solving Recursive Sequences by Iteration Lecture 25 Section 5.7 Robb T. Koether Hampden-Sydney College Thu, Feb 28, 2013 Robb T. Koether (Hampden-Sydney College) Solving Recursive Sequences by Iteration

More information

LR Parsing - Conflicts

LR Parsing - Conflicts LR Parsing - Conflicts Lecture 15 Sections 4.5, 4.6 Robb T. Koether Hampden-Sydney College Fri, Feb 20, 2015 Robb T. Koether (Hampden-Sydney College) LR Parsing - Conflicts Fri, Feb 20, 2015 1 / 15 1 Shift/Reduce

More information

Street-Routing Problems

Street-Routing Problems Street-Routing Problems Lecture 26 Sections 5.1-5.2 Robb T. Koether Hampden-Sydney College Wed, Oct 25, 2017 Robb T. Koether (Hampden-Sydney College) Street-Routing Problems Wed, Oct 25, 2017 1 / 21 1

More information

Binary Tree Applications

Binary Tree Applications Binary Tree Applications Lecture 30 Section 19.2 Robb T. Koether Hampden-Sydney College Wed, Apr 15, 2015 Robb T. Koether (Hampden-Sydney College) Binary Tree Applications Wed, Apr 15, 2015 1 / 56 1 Binary

More information

Webpage Navigation. Lecture 27. Robb T. Koether. Hampden-Sydney College. Mon, Apr 2, 2018

Webpage Navigation. Lecture 27. Robb T. Koether. Hampden-Sydney College. Mon, Apr 2, 2018 Webpage Navigation Lecture 27 Robb T. Koether Hampden-Sydney College Mon, Apr 2, 2018 Robb T. Koether (Hampden-Sydney College) Webpage Navigation Mon, Apr 2, 2018 1 / 16 1 Popup Boxes 2 The Document Object

More information

Operators. Lecture 12 Section Robb T. Koether. Hampden-Sydney College. Fri, Feb 9, 2018

Operators. Lecture 12 Section Robb T. Koether. Hampden-Sydney College. Fri, Feb 9, 2018 Operators Lecture 12 Section 14.5 Robb T. Koether Hampden-Sydney College Fri, Feb 9, 2018 Robb T. Koether (Hampden-Sydney College) Operators Fri, Feb 9, 2018 1 / 21 Outline 1 Operators as Functions 2 Operator

More information

Nondeterministic Programming in C++

Nondeterministic Programming in C++ Nondeterministic Programming in C++ Lecture 37 Sections 14.5 Robb T. Koether Hampden-Sydney College Wed, Nov 30, 2016 Robb T. Koether (Hampden-Sydney College) Nondeterministic Programming in C++ Wed, Nov

More information

Function Usage. Lecture 15 Sections 6.3, 6.4. Robb T. Koether. Hampden-Sydney College. Mon, Oct 1, 2018

Function Usage. Lecture 15 Sections 6.3, 6.4. Robb T. Koether. Hampden-Sydney College. Mon, Oct 1, 2018 Function Usage Lecture 15 Sections 6.3, 6.4 Robb T. Koether Hampden-Sydney College Mon, Oct 1, 2018 Robb T. Koether (Hampden-Sydney College) Function Usage Mon, Oct 1, 2018 1 / 12 1 Function and Parameters

More information

Displaying Distributions - Quantitative Variables

Displaying Distributions - Quantitative Variables Displaying Distributions - Quantitative Variables Lecture 13 Sections 4.4.1-4.4.3 Robb T. Koether Hampden-Sydney College Wed, Feb 8, 2012 Robb T. Koether (Hampden-Sydney College)Displaying Distributions

More information

Friends and Unary Operators

Friends and Unary Operators Friends and Unary Operators Lecture 11 Sections 11.3, 11.6 Robb T. Koether Hampden-Sydney College Fri, Feb 13, 2015 Robb T. Koether (Hampden-Sydney College) Friends and Unary Operators Fri, Feb 13, 2015

More information

The Traveling Salesman Problem Cheapest-Link Algorithm

The Traveling Salesman Problem Cheapest-Link Algorithm The Traveling Salesman Problem heapest-link lgorithm Lecture 3 Sections.5 Robb T. Koether ampden-sydney ollege Wed, Nov 1, 201 Robb T. Koether (ampden-sydney ollege)the Traveling Salesman Problemheapest-Link

More information

Graphics Pipeline 2D Geometric Transformations

Graphics Pipeline 2D Geometric Transformations Graphics Pipeline 2D Geometric Transformations CS 4620 Lecture 8 1 Plane projection in drawing Albrecht Dürer 2 Plane projection in drawing source unknown 3 Rasterizing triangles Summary 1 evaluation of

More information

Density Curves Sections

Density Curves Sections Density Curves Sections 3.1-3.2 Lecture 8 Robb T. Koether Hampden-Sydney College Wed, Jan 27, 2016 Robb T. Koether (Hampden-Sydney College) Density CurvesSections 3.1-3.2 Wed, Jan 27, 2016 1 / 18 Outline

More information

Function Definition Syntax Tree

Function Definition Syntax Tree Function Definition Syntax Tree Lecture 34 Section 6.9 Robb T. Koether Hampden-Sydney College Wed, Apr 15, 2015 Robb T. Koether (Hampden-Sydney College) Function Definition Syntax Tree Wed, Apr 15, 2015

More information

Boxplots. Lecture 17 Section Robb T. Koether. Hampden-Sydney College. Wed, Feb 10, 2010

Boxplots. Lecture 17 Section Robb T. Koether. Hampden-Sydney College. Wed, Feb 10, 2010 Boxplots Lecture 17 Section 5.3.3 Robb T. Koether Hampden-Sydney College Wed, Feb 10, 2010 Robb T. Koether (Hampden-Sydney College) Boxplots Wed, Feb 10, 2010 1 / 34 Outline 1 Boxplots TI-83 Boxplots 2

More information

The x86 Instruction Set

The x86 Instruction Set The x86 Instruction Set Lecture 25 Intel Manual, Vols. 2A & 2B Robb T. Koether Hampden-Sydney College Mon, Mar 23, 2015 Robb T. Koether (Hampden-Sydney College) The x86 Instruction Set Mon, Mar 23, 2015

More information

Recognition of Tokens

Recognition of Tokens Recognition of Tokens Lecture 3 Section 3.4 Robb T. Koether Hampden-Sydney College Mon, Jan 19, 2015 Robb T. Koether (Hampden-Sydney College) Recognition of Tokens Mon, Jan 19, 2015 1 / 21 1 A Class of

More information

Programming Languages

Programming Languages Programming Languages Lecture 3 Robb T. Koether Hampden-Sydney College Fri, Aug 31, 2018 Robb T. Koether (Hampden-Sydney College) Programming Languages Fri, Aug 31, 2018 1 / 23 1 Programming Languages

More information

Boolean Expressions. Lecture 31 Sections 6.6, 6.7. Robb T. Koether. Hampden-Sydney College. Wed, Apr 8, 2015

Boolean Expressions. Lecture 31 Sections 6.6, 6.7. Robb T. Koether. Hampden-Sydney College. Wed, Apr 8, 2015 Boolean Expressions Lecture 31 Sections 6.6, 6.7 Robb T. Koether Hampden-Sydney College Wed, Apr 8, 2015 Robb T. Koether (Hampden-Sydney College) Boolean Expressions Wed, Apr 8, 2015 1 / 22 1 Relational

More information

Pointers. Lecture 2 Sections Robb T. Koether. Hampden-Sydney College. Mon, Jan 20, 2014

Pointers. Lecture 2 Sections Robb T. Koether. Hampden-Sydney College. Mon, Jan 20, 2014 Pointers Lecture 2 Sections 10.3-10.8 Robb T. Koether Hampden-Sydney College Mon, Jan 20, 2014 Robb T. Koether (Hampden-Sydney College) Pointers Mon, Jan 20, 2014 1 / 35 1 Endianness 2 Pointer Arithmetic

More information

XPath Lecture 34. Robb T. Koether. Hampden-Sydney College. Wed, Apr 11, 2012

XPath Lecture 34. Robb T. Koether. Hampden-Sydney College. Wed, Apr 11, 2012 XPath Lecture 34 Robb T. Koether Hampden-Sydney College Wed, Apr 11, 2012 Robb T. Koether (Hampden-Sydney College) XPathLecture 34 Wed, Apr 11, 2012 1 / 20 1 XPath Functions 2 Predicates 3 Axes Robb T.

More information

Integer Overflow. Lecture 8 Section 2.5. Robb T. Koether. Hampden-Sydney College. Mon, Jan 27, 2014

Integer Overflow. Lecture 8 Section 2.5. Robb T. Koether. Hampden-Sydney College. Mon, Jan 27, 2014 Integer Overflow Lecture 8 Section 2.5 Robb T. Koether Hampden-Sydney College Mon, Jan 27, 2014 Robb T. Koether (Hampden-Sydney College) Integer Overflow Mon, Jan 27, 2014 1 / 32 1 Signed Addition and

More information

The Plurality-with-Elimination Method

The Plurality-with-Elimination Method The Plurality-with-Elimination Method Lecture 9 Section 1.4 Robb T. Koether Hampden-Sydney College Fri, Sep 8, 2017 Robb T. Koether (Hampden-Sydney College) The Plurality-with-Elimination Method Fri, Sep

More information

Building the Abstract Syntax Trees

Building the Abstract Syntax Trees Building the Abstract Syntax Trees Lecture 23 Section 5.3 Robb T. Koether Hampden-Sydney College Wed, Mar 18, 2015 Robb T. Koether (Hampden-Sydney College) Building the Abstract Syntax Trees Wed, Mar 18,

More information

SUMMARY. CS380: Introduction to Computer Graphics Varying Variables Chapter 13. Min H. Kim KAIST School of Computing 18/04/26.

SUMMARY. CS380: Introduction to Computer Graphics Varying Variables Chapter 13. Min H. Kim KAIST School of Computing 18/04/26. CS380: Introduction to Computer Graphics Varying Variables Chapter 3 Min H. Kim KAIST School of Computing Rasterization SUMMARY 2 Path from vertex to pixel 3 Clipping coordinates Eye coordinates (projected)

More information

Recursion. Lecture 2 Sections Robb T. Koether. Hampden-Sydney College. Wed, Jan 17, 2018

Recursion. Lecture 2 Sections Robb T. Koether. Hampden-Sydney College. Wed, Jan 17, 2018 Recursion Lecture 2 Sections 20.1-20.4 Robb T. Koether Hampden-Sydney College Wed, Jan 17, 2018 Robb T. Koether (Hampden-Sydney College) Recursion Wed, Jan 17, 2018 1 / 18 1 Recursion 2 Advantages and

More information

The string Class. Lecture 21 Sections 2.9, 3.9, Robb T. Koether. Wed, Oct 17, Hampden-Sydney College

The string Class. Lecture 21 Sections 2.9, 3.9, Robb T. Koether. Wed, Oct 17, Hampden-Sydney College The string Class Lecture 21 Sections 2.9, 3.9, 3.10 Robb T. Koether Hampden-Sydney College Wed, Oct 17, 2018 Robb T. Koether (Hampden-Sydney College) The string Class Wed, Oct 17, 2018 1 / 18 1 The String

More information

DTDs and XML Attributes

DTDs and XML Attributes DTDs and XML Attributes Lecture 33 Robb T. Koether Hampden-Sydney College Mon, Apr 8, 2013 Robb T. Koether (Hampden-Sydney College) DTDs and XML Attributes Mon, Apr 8, 2013 1 / 21 1 Attribute Definitions

More information

MySQL Creating a Database Lecture 3

MySQL Creating a Database Lecture 3 MySQL Creating a Database Lecture 3 Robb T Koether Hampden-Sydney College Mon, Jan 23, 2012 Robb T Koether (Hampden-Sydney College) MySQL Creating a DatabaseLecture 3 Mon, Jan 23, 2012 1 / 31 1 Multiple

More information

PHP Queries and HTML Forms Lecture 23

PHP Queries and HTML Forms Lecture 23 PHP Queries and HTML Forms Lecture 23 Robb T. Koether Hampden-Sydney College Wed, Mar 14, 2018 Robb T. Koether (Hampden-Sydney College) PHP Queries and HTML FormsLecture 23 Wed, Mar 14, 2018 1 / 15 1 Retrieving

More information

The CYK Parsing Algorithm

The CYK Parsing Algorithm The CYK Parsing Algorithm Lecture 19 Section 6.3 Robb T. Koether Hampden-Sydney College Fri, Oct 7, 2016 Robb T. Koether (Hampden-Sydney College) The CYK Parsing Algorithm Fri, Oct 7, 2016 1 / 21 1 The

More information

Linked Lists. Lecture 16 Sections Robb T. Koether. Hampden-Sydney College. Wed, Feb 22, 2017

Linked Lists. Lecture 16 Sections Robb T. Koether. Hampden-Sydney College. Wed, Feb 22, 2017 Linked Lists Lecture 16 Sections 17.1-17.3 Robb T. Koether Hampden-Sydney College Wed, Feb 22, 2017 Robb T. Koether (Hampden-Sydney College) Linked Lists Wed, Feb 22, 2017 1 / 24 1 Linked Lists 2 The LinkedListNode

More information

Mach band effect. The Mach band effect increases the visual unpleasant representation of curved surface using flat shading.

Mach band effect. The Mach band effect increases the visual unpleasant representation of curved surface using flat shading. Mach band effect The Mach band effect increases the visual unpleasant representation of curved surface using flat shading. A B 320322: Graphics and Visualization 456 Mach band effect The Mach band effect

More information

3D Graphics and OpenGl. First Steps

3D Graphics and OpenGl. First Steps 3D Graphics and OpenGl First Steps Rendering of 3D Graphics Objects defined in (virtual/mathematical) 3D space. Rendering of 3D Graphics Objects defined in (virtual/mathematical) 3D space. We see surfaces

More information

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

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

More information

Implementing Linked Lists

Implementing Linked Lists Implementing Linked Lists Lecture 16 Sections 17.1-17.3 Robb T. Koether Hampden-Sydney College Wed, Feb 27, 2013 Robb T. Koether (Hampden-Sydney College) Implementing Linked Lists Wed, Feb 27, 2013 1 /

More information

Introduction to Databases

Introduction to Databases Introduction to Databases Lecture 1 Robb T. Koether Hampden-Sydney College Mon, Jan 15, 2018 Robb T. Koether (Hampden-Sydney College) Introduction to Databases Mon, Jan 15, 2018 1 / 16 1 Overview of the

More information

XML Attributes. Lecture 33. Robb T. Koether. Hampden-Sydney College. Wed, Apr 25, 2018

XML Attributes. Lecture 33. Robb T. Koether. Hampden-Sydney College. Wed, Apr 25, 2018 XML Attributes Lecture 33 Robb T. Koether Hampden-Sydney College Wed, Apr 25, 2018 Robb T. Koether (Hampden-Sydney College) XML Attributes Wed, Apr 25, 2018 1 / 15 1 XML Attributes 2 The getattribute()

More information

Regular Expressions. Lecture 10 Sections Robb T. Koether. Hampden-Sydney College. Wed, Sep 14, 2016

Regular Expressions. Lecture 10 Sections Robb T. Koether. Hampden-Sydney College. Wed, Sep 14, 2016 Regular Expressions Lecture 10 Sections 3.1-3.2 Robb T. Koether Hampden-Sydney College Wed, Sep 14, 2016 Robb T. Koether (Hampden-Sydney College) Regular Expressions Wed, Sep 14, 2016 1 / 23 Outline 1

More information

Recursive Linked Lists

Recursive Linked Lists Recursive Linked Lists Lecture 28 Sections 14.1-14.5, 14.7 Robb T. Koether Hampden-Sydney College Fri, Mar 31, 2017 Robb T. Koether (Hampden-Sydney College) Recursive Linked Lists Fri, Mar 31, 2017 1 /

More information

Pointers. Lecture 1 Sections Robb T. Koether. Hampden-Sydney College. Wed, Jan 14, 2015

Pointers. Lecture 1 Sections Robb T. Koether. Hampden-Sydney College. Wed, Jan 14, 2015 Pointers Lecture 1 Sections 10.1-10.2 Robb T. Koether Hampden-Sydney College Wed, Jan 14, 2015 Robb T. Koether (Hampden-Sydney College) Pointers Wed, Jan 14, 2015 1 / 23 1 Pointers 2 Pointer Initialization

More information

Abstract Data Types. Lecture 23 Section 7.1. Robb T. Koether. Hampden-Sydney College. Wed, Oct 24, 2012

Abstract Data Types. Lecture 23 Section 7.1. Robb T. Koether. Hampden-Sydney College. Wed, Oct 24, 2012 Abstract Data Types Lecture 23 Section 7.1 Robb T. Koether Hampden-Sydney College Wed, Oct 24, 2012 Robb T. Koether (Hampden-Sydney College) Abstract Data Types Wed, Oct 24, 2012 1 / 19 1 Abstract Data

More information

Pointers. Lecture 2 Sections Robb T. Koether. Hampden-Sydney College. Fri, Jan 18, 2013

Pointers. Lecture 2 Sections Robb T. Koether. Hampden-Sydney College. Fri, Jan 18, 2013 Pointers Lecture 2 Sections 10.3-10.8 Robb T. Koether Hampden-Sydney College Fri, Jan 18, 2013 Robb T. Koether (Hampden-Sydney College) Pointers Fri, Jan 18, 2013 1 / 35 1 Introduction 2 Pointer Arithmetic

More information

LR Parsing - The Items

LR Parsing - The Items LR Parsing - The Items Lecture 10 Sections 4.5, 4.7 Robb T. Koether Hampden-Sydney College Fri, Feb 13, 2015 Robb T. Koether (Hampden-Sydney College) LR Parsing - The Items Fri, Feb 13, 2015 1 / 31 1 LR

More information

Lecture 3 Sections 2.2, 4.4. Mon, Aug 31, 2009

Lecture 3 Sections 2.2, 4.4. Mon, Aug 31, 2009 Model s Lecture 3 Sections 2.2, 4.4 World s Eye s Clip s s s Window s Hampden-Sydney College Mon, Aug 31, 2009 Outline Model s World s Eye s Clip s s s Window s 1 2 3 Model s World s Eye s Clip s s s Window

More information

Basic PHP. Lecture 19. Robb T. Koether. Hampden-Sydney College. Mon, Feb 26, 2108

Basic PHP. Lecture 19. Robb T. Koether. Hampden-Sydney College. Mon, Feb 26, 2108 Basic PHP Lecture 19 Robb T. Koether Hampden-Sydney College Mon, Feb 26, 2108 Robb T. Koether (Hampden-Sydney College) Basic PHP Mon, Feb 26, 2108 1 / 27 1 PHP 2 The echo Statement 3 Variables 4 Operators

More information

XPath. Lecture 36. Robb T. Koether. Wed, Apr 16, Hampden-Sydney College. Robb T. Koether (Hampden-Sydney College) XPath Wed, Apr 16, / 28

XPath. Lecture 36. Robb T. Koether. Wed, Apr 16, Hampden-Sydney College. Robb T. Koether (Hampden-Sydney College) XPath Wed, Apr 16, / 28 XPath Lecture 36 Robb T. Koether Hampden-Sydney College Wed, Apr 16, 2014 Robb T. Koether (Hampden-Sydney College) XPath Wed, Apr 16, 2014 1 / 28 1 XPath 2 Executing XPath Expressions 3 XPath Expressions

More information

Introduction to Compiler Design

Introduction to Compiler Design Introduction to Compiler Design Lecture 1 Chapters 1 and 2 Robb T. Koether Hampden-Sydney College Wed, Jan 14, 2015 Robb T. Koether (Hampden-Sydney College) Introduction to Compiler Design Wed, Jan 14,

More information

XQuery FLOWR Expressions Lecture 35

XQuery FLOWR Expressions Lecture 35 XQuery FLOWR Expressions Lecture 35 Robb T. Koether Hampden-Sydney College Fri, Apr 13, 2012 Robb T. Koether (Hampden-Sydney College) XQuery FLOWR ExpressionsLecture 35 Fri, Apr 13, 2012 1 / 33 1 XQuery

More information

Pointer Arithmetic. Lecture 4 Chapter 10. Robb T. Koether. Hampden-Sydney College. Wed, Jan 25, 2017

Pointer Arithmetic. Lecture 4 Chapter 10. Robb T. Koether. Hampden-Sydney College. Wed, Jan 25, 2017 Pointer Arithmetic Lecture 4 Chapter 10 Robb T. Koether Hampden-Sydney College Wed, Jan 25, 2017 Robb T. Koether (Hampden-Sydney College) Pointer Arithmetic Wed, Jan 25, 2017 1 / 36 1 Pointer Arithmetic

More information

Inheritance: The Fundamental Functions

Inheritance: The Fundamental Functions Inheritance: The Fundamental Functions Lecture 21 Sections 11.11-11.12 Robb T. Koether Hampden-Sydney College Mon, Mar 17, 2014 Robb T. Koether (Hampden-Sydney College) Inheritance: The Fundamental Functions

More information

The x87 Floating-Point Unit

The x87 Floating-Point Unit The x87 Floating-Point Unit Lecture 27 Intel Manual, Vol. 1, Chapter 8 Intel Manual, Vol. 2 Robb T. Koether Hampden-Sydney College Fri, Mar 27, 2015 Robb T. Koether (Hampden-Sydney College) The x87 Floating-Point

More information

Rendering. Converting a 3D scene to a 2D image. Camera. Light. Rendering. View Plane

Rendering. Converting a 3D scene to a 2D image. Camera. Light. Rendering. View Plane Rendering Pipeline Rendering Converting a 3D scene to a 2D image Rendering Light Camera 3D Model View Plane Rendering Converting a 3D scene to a 2D image Basic rendering tasks: Modeling: creating the world

More information

The Class Construct Part 2

The Class Construct Part 2 The Class Construct Part 2 Lecture 24 Sections 7.7-7.9 Robb T. Koether Hampden-Sydney College Mon, Oct 29, 2018 Robb T. Koether (Hampden-Sydney College) The Class Construct Part 2 Mon, Oct 29, 2018 1 /

More information

Mipmaps. Lecture 23 Subsection Fri, Oct 30, Hampden-Sydney College. Mipmaps. Robb T. Koether. Discrete Sampling.

Mipmaps. Lecture 23 Subsection Fri, Oct 30, Hampden-Sydney College. Mipmaps. Robb T. Koether. Discrete Sampling. Lecture 23 Subsection 8.8.2 Hampden-Sydney College Fri, Oct 30, 2009 Outline 1 2 3 4 5 dumay.info Outline 1 2 3 4 5 dumay.info Suppose we are drawing a 2-dimensional black-and-white checkerboard pattern.

More information

List Iterator Implementation

List Iterator Implementation List Iterator Implementation Lecture 28 Section 14.6 Robb T. Koether Hampden-Sydney College Fri, Apr 10, 2015 Robb T. Koether (Hampden-Sydney College) List Iterator Implementation Fri, Apr 10, 2015 1 /

More information

Homework 3: Programmable Shaders

Homework 3: Programmable Shaders Homework 3: Programmable Shaders Introduction to Computer Graphics and Imaging (Summer 2012), Stanford University Due Monday, July 23, 11:59pm Warning: The coding portion of this homework involves features

More information

The Mesh Class. Lecture 23. Robb T. Koether. Hampden-Sydney College. Wed, Oct 18, 2017

The Mesh Class. Lecture 23. Robb T. Koether. Hampden-Sydney College. Wed, Oct 18, 2017 The Mesh Class Lecture 23 Robb T. Koether Hampden-Sydney College Wed, Oct 18, 2017 Robb T. Koether (Hampden-Sydney College) The Mesh Class Wed, Oct 18, 2017 1 / 21 Outline 1 The Mesh Class 2 Assignment

More information

ECS 175 COMPUTER GRAPHICS. Ken Joy.! Winter 2014

ECS 175 COMPUTER GRAPHICS. Ken Joy.! Winter 2014 ECS 175 COMPUTER GRAPHICS Ken Joy Winter 2014 Shading To be able to model shading, we simplify Uniform Media no scattering of light Opaque Objects No Interreflection Point Light Sources RGB Color (eliminating

More information

Rasterization. CS 4620 Lecture Kavita Bala w/ prior instructor Steve Marschner. Cornell CS4620 Fall 2015 Lecture 16

Rasterization. CS 4620 Lecture Kavita Bala w/ prior instructor Steve Marschner. Cornell CS4620 Fall 2015 Lecture 16 Rasterization CS 4620 Lecture 16 1 Announcements A3 due on Thu Will send mail about grading once finalized 2 Pipeline overview you are here APPLICATION COMMAND STREAM 3D transformations; shading VERTEX

More information

Aggregation. Lecture 7 Section Robb T. Koether. Hampden-Sydney College. Wed, Jan 29, 2014

Aggregation. Lecture 7 Section Robb T. Koether. Hampden-Sydney College. Wed, Jan 29, 2014 Aggregation Lecture 7 Section 5.1.7-5.1.8 Robb T. Koether Hampden-Sydney College Wed, Jan 29, 2014 Robb T. Koether (Hampden-Sydney College) Aggregation Wed, Jan 29, 2014 1 / 17 1 Aggregate Functions 2

More information

Array Lists. Lecture 15. Robb T. Koether. Hampden-Sydney College. Mon, Feb 22, 2016

Array Lists. Lecture 15. Robb T. Koether. Hampden-Sydney College. Mon, Feb 22, 2016 Array Lists Lecture 15 Robb T. Koether Hampden-Sydney College Mon, Feb 22, 2016 Robb T. Koether (Hampden-Sydney College) Array Lists Mon, Feb 22, 2016 1 / 23 1 Inlining Functions 2 List Implementations

More information

Introduction to Databases

Introduction to Databases Introduction to Databases Lecture 1 Chapters 1-2 Robb T. Koether Hampden-Sydney College Wed, Jan 15, 2014 Robb T. Koether (Hampden-Sydney College) Introduction to Databases Wed, Jan 15, 2014 1 / 23 1 Overview

More information

Fundamental Data Types

Fundamental Data Types Fundamental Data Types Lecture 4 Sections 2.7-2.10 Robb T. Koether Hampden-Sydney College Mon, Sep 3, 2018 Robb T. Koether (Hampden-Sydney College) Fundamental Data Types Mon, Sep 3, 2018 1 / 25 1 Integers

More information

Triggers. Lecture 14. Robb T. Koether. Hampden-Sydney College. Wed, Feb 14, 2018

Triggers. Lecture 14. Robb T. Koether. Hampden-Sydney College. Wed, Feb 14, 2018 Triggers Lecture 14 Robb T. Koether Hampden-Sydney College Wed, Feb 14, 2018 Robb T. Koether (Hampden-Sydney College) Triggers Wed, Feb 14, 2018 1 / 22 1 Triggers 2 Cascading Triggers 3 Update and Insert

More information

Functional Dependencies and Normal Forms

Functional Dependencies and Normal Forms Functional Dependencies and Normal Forms Lecture 9 Sections 15.1-15.4 Robb T. Koether Hampden-Sydney College Mon, Feb 4, 2013 Robb T. Koether (Hampden-Sydney College) Functional Dependencies and Normal

More information

Review. Lecture 39. Robb T. Koether. Mon, Dec 5, Hampden-Sydney College. Robb T. Koether (Hampden-Sydney College) Review Mon, Dec 5, / 14

Review. Lecture 39. Robb T. Koether. Mon, Dec 5, Hampden-Sydney College. Robb T. Koether (Hampden-Sydney College) Review Mon, Dec 5, / 14 Review Lecture 39 Robb T. Koether Hampden-Sydney College Mon, Dec 5, 2016 Robb T. Koether (Hampden-Sydney College) Review Mon, Dec 5, 2016 1 / 14 1 The Exam Test #2 Test #3 Robb T. Koether (Hampden-Sydney

More information