<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="assets/xml/rss.xsl" media="all"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>CG ECSE-4750-01 and 6964-01 Computer Graphics, Fall 2018, Rensselaer Polytechnic Institute</title><link>https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/</link><description>course web site</description><atom:link href="https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/rss.xml" rel="self" type="application/rss+xml"></atom:link><language>en</language><lastBuildDate>Fri, 21 Dec 2018 20:21:26 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>CG ECSE-4750 Computer Graphics Final Exam Solution, RPI, Tues 2018-12-18</title><link>https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/posts/finalexam-sol/</link><dc:creator>W Randolph Franklin, RPI</dc:creator><description>&lt;div&gt;&lt;p&gt;Name, RCSID: WRF solutions&lt;/p&gt;
&lt;div class="contents topic" id="table-of-contents"&gt;
&lt;p class="topic-title first"&gt;Table of contents&lt;/p&gt;
&lt;ul class="auto-toc simple"&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/posts/finalexam-sol/#grade-statistics" id="id1"&gt;1   Grade statistics&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/posts/finalexam-sol/#scatterplot-of-grade-vs-order-of-finish" id="id2"&gt;2   Scatterplot of grade vs order of finish&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/posts/finalexam-sol/#rules" id="id3"&gt;3   Rules&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/posts/finalexam-sol/#questions" id="id4"&gt;4   Questions&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class="section" id="grade-statistics"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/posts/finalexam-sol/#id1"&gt;1   Grade statistics&lt;/a&gt;&lt;/h2&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;Number of final submissions: 27&lt;/li&gt;
&lt;li&gt;Highest score: 74&lt;/li&gt;
&lt;li&gt;Lowest score: 44&lt;/li&gt;
&lt;li&gt;Average score: 61.78&lt;/li&gt;
&lt;li&gt;Median score: 64&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div class="section" id="scatterplot-of-grade-vs-order-of-finish"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/posts/finalexam-sol/#id2"&gt;2   Scatterplot of grade vs order of finish&lt;/a&gt;&lt;/h2&gt;
&lt;img alt="../../files/final-scatter.png" src="https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/files/final-scatter.png"&gt;
&lt;/div&gt;
&lt;div class="section" id="rules"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/posts/finalexam-sol/#id3"&gt;3   Rules&lt;/a&gt;&lt;/h2&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;You have 180 minutes.&lt;/li&gt;
&lt;li&gt;You may bring in two 2-sided 8.5"x11" papers with notes.&lt;/li&gt;
&lt;li&gt;You may not share material with each other during the exam.&lt;/li&gt;
&lt;li&gt;No collaboration or communication (except with the staff) is allowed.&lt;/li&gt;
&lt;li&gt;There are thirty six questions.  Check that your copy of this test has all the pages.&lt;/li&gt;
&lt;li&gt;Full score is 76.&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div class="section" id="questions"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/posts/finalexam-sol/#id4"&gt;4   Questions&lt;/a&gt;&lt;/h2&gt;
&lt;ol class="arabic"&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt; Put these graphics pipeline components in the correct order:&lt;/p&gt;
&lt;ol class="loweralpha simple"&gt;
&lt;li&gt;fragment-shader  4th&lt;/li&gt;
&lt;li&gt;primitive-assembly 2nd&lt;/li&gt;
&lt;li&gt;rasterizer 3rd&lt;/li&gt;
&lt;li&gt;vertex-shader   1st&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt; Which of the following 3D rotation methods is vulnerable to gimbal lock?&lt;/p&gt;
&lt;ol class="loweralpha simple"&gt;
&lt;li&gt;Euler angles *&lt;/li&gt;
&lt;li&gt;matrix&lt;/li&gt;
&lt;li&gt;quaternion&lt;/li&gt;
&lt;li&gt;vector&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt; In the OpenGL pipeline, the Primitive Assembler does what?&lt;/p&gt;
&lt;ol class="loweralpha simple"&gt;
&lt;li&gt;fits together pieces of ancient Sumerian pottery.&lt;/li&gt;
&lt;li&gt;rotates vertices as their coordinate systems change.&lt;/li&gt;
&lt;li&gt;creates lines and polygons from vertices.  *&lt;/li&gt;
&lt;li&gt;finds the pixels for each polygon.&lt;/li&gt;
&lt;li&gt;reports whether the keyboard and mouse are plugged in correctly.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt; When rotating an object, what can happen to an object?&lt;/p&gt;
&lt;ol class="loweralpha simple"&gt;
&lt;li&gt;Straight lines might turn into curves.&lt;/li&gt;
&lt;li&gt;Straight lines stay straight, but angles might change.&lt;/li&gt;
&lt;li&gt;Straight lines stay straight, and angles don't change, but distances may change,    either longer or shorter.&lt;/li&gt;
&lt;li&gt;Straight lines stay straight, and angles don't change, but distances might get    longer.&lt;/li&gt;
&lt;li&gt;Straight lines stay straight, and angles and distances don't change. *&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt; If &lt;em&gt;i&lt;/em&gt; and &lt;em&gt;j&lt;/em&gt; are quaternions, what is &lt;em&gt;i+j&lt;/em&gt;?&lt;/p&gt;
&lt;ol class="loweralpha simple"&gt;
&lt;li&gt;&lt;em&gt;-k&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;0&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;1&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;i+j&lt;/em&gt;, there is no simpler representation.   *&lt;/li&gt;
&lt;li&gt;&lt;em&gt;k&lt;/em&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt; If &lt;em&gt;i&lt;/em&gt; and &lt;em&gt;j&lt;/em&gt; are quaternions, what is &lt;em&gt;ij&lt;/em&gt;?&lt;/p&gt;
&lt;ol class="loweralpha simple"&gt;
&lt;li&gt;&lt;em&gt;-k&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;0&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;1&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;i+j&lt;/em&gt;, there is no simpler representation.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;k&lt;/em&gt;.   *&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt; The quaternion &lt;em&gt;i&lt;/em&gt; represents what rotation?&lt;/p&gt;
&lt;ol class="loweralpha simple"&gt;
&lt;li&gt;180 degrees about the x-axis.  *&lt;/li&gt;
&lt;li&gt;90 degrees about the x-axis.&lt;/li&gt;
&lt;li&gt;180 degrees about the y-axis.&lt;/li&gt;
&lt;li&gt;90 degrees about the y-axis.&lt;/li&gt;
&lt;li&gt;no change, i.e., 0 degrees about anything.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt; The parametric equation of a line through the points (1,1) and (2,3) is:&lt;/p&gt;
&lt;ol class="loweralpha simple"&gt;
&lt;li&gt;P = (1,1) + t(1,0) + u(0,1)&lt;/li&gt;
&lt;li&gt;P = (1,1) + t(1,1)&lt;/li&gt;
&lt;li&gt;P = (1,1) + t(1,2)   *&lt;/li&gt;
&lt;li&gt;P = (1,1) + t(2,3)&lt;/li&gt;
&lt;li&gt;P = t(1,1) + u(2,3)&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt; The normal vector of length one to the plane through the points (1,0,0),
(0,1,0), (0,0,1) is&lt;/p&gt;
&lt;ol class="loweralpha simple"&gt;
&lt;li&gt;(1,0,0)&lt;/li&gt;
&lt;li&gt;&lt;span class="math"&gt;\(\left( \frac{1}{\sqrt{3}}, \frac{1}{\sqrt{3}}, \frac{1}{\sqrt{3}} \right)\)&lt;/span&gt;  *&lt;/li&gt;
&lt;li&gt;(-1, 0, 0)&lt;/li&gt;
&lt;li&gt;3&lt;/li&gt;
&lt;li&gt;(1/3, 1/3, 1/3)&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;You call gl.BufferSubData to do what?&lt;/p&gt;
&lt;ol class="loweralpha simple"&gt;
&lt;li&gt;to add or replace part of the buffer in the GPU.  *&lt;/li&gt;
&lt;li&gt;to define a submarine object.&lt;/li&gt;
&lt;li&gt;to subtract some data in the buffer.&lt;/li&gt;
&lt;li&gt;to tell the GPU to look for a pattern and substitute any occurrences,&lt;/li&gt;
&lt;li&gt;to tell the GPU to use a subroutine instead of the main program.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt;  Translating the 2D homogeneous point by (1,2,3) by (in Cartesian terms)
dx=1, dy=2 gives which new homogeneous point?&lt;/p&gt;
&lt;ol class="loweralpha simple"&gt;
&lt;li&gt;(1,2,3)&lt;/li&gt;
&lt;li&gt;(1,2,3,4)&lt;/li&gt;
&lt;li&gt;(2,4)&lt;/li&gt;
&lt;li&gt;(2,4,3)&lt;/li&gt;
&lt;li&gt;(4,8,3)  *&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;as Cart:  (1/3,2/3)+(1,2) = (4/3,8/3)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt; Rotating the 2D Cartesian point (0,1) by 90 degrees gives what:&lt;/p&gt;
&lt;ol class="loweralpha simple"&gt;
&lt;li&gt;(1,0)&lt;/li&gt;
&lt;li&gt;(-1,0) * (corrected)&lt;/li&gt;
&lt;li&gt;(0,1)&lt;/li&gt;
&lt;li&gt;(0,-1)&lt;/li&gt;
&lt;li&gt;(-.7,.7)&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt; Give me a matrix M that has this property:  for all vectors p,
&lt;span class="math"&gt;\(Mp =  \begin{pmatrix}2&amp;amp;3&amp;amp;1\end{pmatrix}  \times p\)&lt;/span&gt;. The operator is the vector cross product.&lt;/p&gt;
&lt;p&gt;&lt;span class="math"&gt;\(\begin{pmatrix}0 &amp;amp; -1 &amp;amp; 3 \\ 1 &amp;amp; 0 &amp;amp; -2\\ -3 &amp;amp; 2 &amp;amp; 0 \end{pmatrix}\)&lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt; In a fragment shader, a sampler2D does something more than a simple array lookup like you have in most programming languages.  What?&lt;/p&gt;
&lt;p&gt;If the subscripts are fractions, this blends the adjacent texels.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt; Tell me about &lt;em&gt;view normalization&lt;/em&gt;.  What is it?   What is good about it?&lt;/p&gt;
&lt;p&gt;Transforms the scene and the projection together to make the projection orthogonal down one axis and the clip region a 2x2x2 cube centered on the origin.   However a cube in the scene becomes a truncated pyramid.   The simpler projection and clip polyhedron are a win.  E.g., the hardware is simpler.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/4&lt;/em&gt; Compute the projection equations when the viewpoint is at (0,0,0) and the projection plane is 2x+y+z=4.   Use Cartesian coordinates.   You do not need to put the result into a matrix form, but simplify your result as much as possible.&lt;/p&gt;
&lt;p&gt;The projection will be a scaling since the center is at the origin.   Point (x,y,z) will scale to (ax,ay,az) where 2ax+ay+az=4, so a=4/(2x+y+z).   So, the projection is:&lt;/p&gt;
&lt;p&gt;x' = 4x/(2x+y+z),    y' = 4y/(2x+y+z),    z' = 4z/(2x+y+z),&lt;/p&gt;
&lt;p&gt;You could start with the matrix mentioned in class and end with this:&lt;/p&gt;
&lt;p&gt;&lt;span class="math"&gt;\(\left( \begin{array}{cccc} 4 &amp;amp;0&amp;amp;0&amp;amp;0\\ 0&amp;amp;4&amp;amp;0&amp;amp;0\\  0&amp;amp;0&amp;amp;4&amp;amp;0 \\ 2&amp;amp;1&amp;amp;1&amp;amp;0 \end{array} \right)\)&lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt; Name the algorithm that was designed to rasterize a circle using only integer additions, subtractions, and shifts.&lt;/p&gt;
&lt;p&gt;Bresenham's circle algorithm.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt; In a shader, what is the difference between a uniform variable and a varying variable?&lt;/p&gt;
&lt;p&gt;A uniform variable is a global constant that is the same for all vertices.   A varying variable is computed in the vertex shader and then interpolated across the polygon to give a value at each fragment that is input to the fragment shader.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt; Give 2 reasons why we usually use a sequence of low-degree curves instead of one high degree curve.&lt;/p&gt;
&lt;p&gt;No local control: changing one control point can change the whole curve.   Badly conditioned matrix:  a small change in a control point can cause a big change in the curve.   Sensitivity to numerical roundoff errors.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt; What does the word &lt;em&gt;rational&lt;/em&gt; mean in NURBS?&lt;/p&gt;
&lt;p&gt;NURBS use homogeneous coordinates, so their Cartesian X, Y, and Z are ratios.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt; What is the difference between &lt;em&gt;Phong&lt;/em&gt; shading and &lt;em&gt;Gouraud&lt;/em&gt; shading?&lt;/p&gt;
&lt;p&gt;Gouraud shading computes a color for each vertex and then interpolates it across the polygon (face).   Phong shading starts with a surface normal at each vertex of the polygon and interpolates an approximate normal for each pixel of the polygon.   Then, in the fragment shader, this approximate normal is normalized an input into the lighting equation that is the subject of the following question.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt; In the Phong lighting model, which computes the color or brightness of each pixel, how do you make a surface material more metallic or shiny?&lt;/p&gt;
&lt;p&gt;The shininess is the exponent of the dot product of the view vector and reflected vector.   Higher means shinier.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt;   Where is the 3D homogeneous point (1,0,0,0)?&lt;/p&gt;
&lt;p&gt;At infinity in the Cartesian direction (1,0,0).  Informally, at the end of the positive X axis.  The limit of the Cartesian point sequence (x,0,0) as x approaches infinity.   The center of projection for a parallel projection down the X axis.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt; Consider a 2D cubic Bezier curve with Cartesian control points (0,0), (1,1), (2,2), (3,3).  What is the point at t=0.5?&lt;/p&gt;
&lt;p&gt;1/8 (0,0) + 3/8 (1,1) + 3/8 (2,2) + 1/8 (3,3) = (3/2, 3/2)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt;  Describe what the curve in the previous question looks like.&lt;/p&gt;
&lt;p&gt;A straight line from (0,0) to (3,3).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt; What is &lt;em&gt;Constructive Solid Geometry&lt;/em&gt;?&lt;/p&gt;
&lt;p&gt;Constructive solid geometry allows a modeler to create a complex surface or object by using Boolean operators to combine simpler objects - Wikipedia.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt; What texture mapping problem does the &lt;em&gt;mipmap&lt;/em&gt; solve?&lt;/p&gt;
&lt;p&gt;The projected size of the texels are usually not close to the size of the pixels.  This is a problem because:  If the texels are smaller than the pixels, aliasing issues arise.  If larger, then several adjacent pixels will be the same color, making the image look posterized.  Mipmaps solve this by precalculating a pyramid of texture maps that are coarser and coarser.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt;  Mathematically, the aliasing problem in CG&lt;/p&gt;
&lt;ol class="loweralpha simple"&gt;
&lt;li&gt;happens when high frequency signals are not sampled often enough.&lt;/li&gt;
&lt;li&gt;happens when low frequency signals are sampled too often.&lt;/li&gt;
&lt;li&gt;is a new problem that did not occur with the old displays.&lt;/li&gt;
&lt;li&gt;can be reduced by subsampling and averaging&lt;/li&gt;
&lt;li&gt;both (a) and (d).  *&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt; About polygon clipping:&lt;/p&gt;
&lt;ol class="loweralpha simple"&gt;
&lt;li&gt;A polygon might gain vertices. *&lt;/li&gt;
&lt;li&gt;A polygon might gain area.&lt;/li&gt;
&lt;li&gt;If a polygon's vertices are all outside the clip region, then it may be deleted.&lt;/li&gt;
&lt;li&gt;Using a 6-stage pipeline keeps the latency the same.&lt;/li&gt;
&lt;li&gt;Concave polygons become convex.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt;   A small light source that is twice as far away is 1/4 as bright.  That is, there is an inverse square fall off for brightness.     However, when modeling light in graphics, we usually don't do that.  Why?&lt;/p&gt;
&lt;p&gt;Various reasons.  The dynamic range of brightness in the scene would then be too great.   If the light is bigger than a point and we're not too far away, or if there is ambient light, then the brightness falls off more slowly.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt; What tool maps spectral colors into a human perceptual coordinate system?  Your use it to determine the visual result of mixing colors.&lt;/p&gt;
&lt;p&gt;The CIE Chromaticity diagram.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt; With a B-spline, the joints are usually invisible because the two segments meet with C2 continuity.   Sometimes a designer may want there to be a visible kink at a joint, i.e., wants only C0 continuity.   How can that be achieved?&lt;/p&gt;
&lt;p&gt;To reduce C2 continuity to C0 continuity at a joint, make 3 control points coincide.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt; What's the hardest part of implementing the painters algorithm?&lt;/p&gt;
&lt;p&gt;Sorting the polygons back to front.   This is always hard if they overlap in Z and sometimes impossible.  Then you have to split a polygon.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt; Consider a cube.  It has both geometry and topology.  What is the geometry and what is the topology?&lt;/p&gt;
&lt;p&gt;Geometry: the positions of the vertices.  Topology: which vertices (i.e., their id numbers) make up the edges and faces.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt; Name the javascript  WebGL function that sets the current buffer for future buffer operations.&lt;/p&gt;
&lt;p&gt;bindBuffer&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt; Name the javascript  WebGL function that   declares that the current buffer contains 3 floats per vertex (or generally some number of some type per vertex).&lt;/p&gt;
&lt;p&gt;vertexAttribPointer&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;em&gt;End of final exam.  Total: 76 points.&lt;/em&gt;&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;</description><category>exam</category><category>mathjax</category><guid>https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/posts/finalexam-sol/</guid><pubDate>Tue, 18 Dec 2018 05:00:00 GMT</pubDate></item><item><title>CG ECSE-4750 Computer Graphics Final Exam, RPI, Tues 2018-12-18</title><link>https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/posts/finalexam/</link><dc:creator>W Randolph Franklin, RPI</dc:creator><description>&lt;div&gt;&lt;p&gt;Name, RCSID:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
.




.
&lt;/pre&gt;
&lt;p&gt;Rules:&lt;/p&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;You have 180 minutes.&lt;/li&gt;
&lt;li&gt;You may bring in two 2-sided 8.5"x11" papers with notes.&lt;/li&gt;
&lt;li&gt;You may not share material with each other during the exam.&lt;/li&gt;
&lt;li&gt;No collaboration or communication (except with the staff) is allowed.&lt;/li&gt;
&lt;li&gt;There are thirty six questions.  Check that your copy of this test has all the pages.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Questions:&lt;/p&gt;
&lt;ol class="arabic"&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt; Put these graphics pipeline components in the correct order:&lt;/p&gt;
&lt;ol class="loweralpha simple"&gt;
&lt;li&gt;fragment-shader&lt;/li&gt;
&lt;li&gt;primitive-assembly&lt;/li&gt;
&lt;li&gt;rasterizer&lt;/li&gt;
&lt;li&gt;vertex-shader&lt;/li&gt;
&lt;/ol&gt;
&lt;pre class="literal-block"&gt;
.



.
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt; Which of the following 3D rotation methods is vulnerable to gimbal lock?&lt;/p&gt;
&lt;ol class="loweralpha simple"&gt;
&lt;li&gt;Euler angles&lt;/li&gt;
&lt;li&gt;matrix&lt;/li&gt;
&lt;li&gt;quaternion&lt;/li&gt;
&lt;li&gt;vector&lt;/li&gt;
&lt;/ol&gt;
&lt;pre class="literal-block"&gt;
.



.
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt; In the OpenGL pipeline, the Primitive Assembler does what?&lt;/p&gt;
&lt;ol class="loweralpha simple"&gt;
&lt;li&gt;fits together pieces of ancient Sumerian pottery.&lt;/li&gt;
&lt;li&gt;rotates vertices as their coordinate systems change.&lt;/li&gt;
&lt;li&gt;creates lines and polygons from vertices.&lt;/li&gt;
&lt;li&gt;finds the pixels for each polygon.&lt;/li&gt;
&lt;li&gt;reports whether the keyboard and mouse are plugged in correctly.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre class="literal-block"&gt;
.



.
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt; When rotating an object, what can happen to an object?&lt;/p&gt;
&lt;ol class="loweralpha simple"&gt;
&lt;li&gt;Straight lines might turn into curves.&lt;/li&gt;
&lt;li&gt;Straight lines stay straight, but angles might change.&lt;/li&gt;
&lt;li&gt;Straight lines stay straight, and angles don't change, but distances may change,    either longer or shorter.&lt;/li&gt;
&lt;li&gt;Straight lines stay straight, and angles don't change, but distances might get    longer.&lt;/li&gt;
&lt;li&gt;Straight lines stay straight, and angles and distances don't change.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre class="literal-block"&gt;
.



.
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt; If &lt;em&gt;i&lt;/em&gt; and &lt;em&gt;j&lt;/em&gt; are quaternions, what is &lt;em&gt;i+j&lt;/em&gt;?&lt;/p&gt;
&lt;ol class="loweralpha simple"&gt;
&lt;li&gt;&lt;em&gt;-k&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;0&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;1&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;i+j&lt;/em&gt;, there is no simpler representation.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;k&lt;/em&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre class="literal-block"&gt;
.



.
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt; If &lt;em&gt;i&lt;/em&gt; and &lt;em&gt;j&lt;/em&gt; are quaternions, what is &lt;em&gt;ij&lt;/em&gt;?&lt;/p&gt;
&lt;ol class="loweralpha simple"&gt;
&lt;li&gt;&lt;em&gt;-k&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;0&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;1&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;i+j&lt;/em&gt;, there is no simpler representation.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;k&lt;/em&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre class="literal-block"&gt;
.



.
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt; The quaternion &lt;em&gt;i&lt;/em&gt; represents what rotation?&lt;/p&gt;
&lt;ol class="loweralpha simple"&gt;
&lt;li&gt;180 degrees about the x-axis.&lt;/li&gt;
&lt;li&gt;90 degrees about the x-axis.&lt;/li&gt;
&lt;li&gt;180 degrees about the y-axis.&lt;/li&gt;
&lt;li&gt;90 degrees about the y-axis.&lt;/li&gt;
&lt;li&gt;no change, i.e., 0 degrees about anything.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre class="literal-block"&gt;
.



.
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt; The parametric equation of a line through the points (1,1) and (2,3) is:&lt;/p&gt;
&lt;ol class="loweralpha simple"&gt;
&lt;li&gt;P = (1,1) + t(1,0) + u(0,1)&lt;/li&gt;
&lt;li&gt;P = (1,1) + t(1,1)&lt;/li&gt;
&lt;li&gt;P = (1,1) + t(1,2)&lt;/li&gt;
&lt;li&gt;P = (1,1) + t(2,3)&lt;/li&gt;
&lt;li&gt;P = t(1,1) + u(2,3)&lt;/li&gt;
&lt;/ol&gt;
&lt;pre class="literal-block"&gt;
.



.
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt; The normal vector of length one to the plane through the points (1,0,0),
(0,1,0), (0,0,1) is&lt;/p&gt;
&lt;ol class="loweralpha simple"&gt;
&lt;li&gt;(1,0,0)&lt;/li&gt;
&lt;li&gt;&lt;span class="math"&gt;\(\left( \frac{1}{\sqrt{3}}, \frac{1}{\sqrt{3}}, \frac{1}{\sqrt{3}} \right)\)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;(-1, 0, 0)&lt;/li&gt;
&lt;li&gt;3&lt;/li&gt;
&lt;li&gt;(1/3, 1/3, 1/3)&lt;/li&gt;
&lt;/ol&gt;
&lt;pre class="literal-block"&gt;
.



.
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt;  You call gl.BufferSubData to do what?&lt;/p&gt;
&lt;ol class="loweralpha simple"&gt;
&lt;li&gt;to add or replace part of the buffer in the GPU.&lt;/li&gt;
&lt;li&gt;to define a submarine object.&lt;/li&gt;
&lt;li&gt;to subtract some data in the buffer.&lt;/li&gt;
&lt;li&gt;to tell the GPU to look for a pattern and substitute any occurrences,&lt;/li&gt;
&lt;li&gt;to tell the GPU to use a subroutine instead of the main program.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre class="literal-block"&gt;
.



.
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt;  Translating the 2D homogeneous point by (1,2,3) by (in Cartesian terms)
dx=1, dy=2 gives which new homogeneous point?&lt;/p&gt;
&lt;ol class="loweralpha simple"&gt;
&lt;li&gt;(1,2,3)&lt;/li&gt;
&lt;li&gt;(1,2,3,4)&lt;/li&gt;
&lt;li&gt;(2,4)&lt;/li&gt;
&lt;li&gt;(2,4,3)&lt;/li&gt;
&lt;li&gt;(4,8,3)&lt;/li&gt;
&lt;/ol&gt;
&lt;pre class="literal-block"&gt;
.



.
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt; Rotating the 2D Cartesian point (0,1) by 90 degrees gives what:&lt;/p&gt;
&lt;ol class="loweralpha simple"&gt;
&lt;li&gt;(1,0)&lt;/li&gt;
&lt;li&gt;(-1,0)&lt;/li&gt;
&lt;li&gt;(0,1)&lt;/li&gt;
&lt;li&gt;(0,-1)&lt;/li&gt;
&lt;li&gt;(-.7,.7)&lt;/li&gt;
&lt;/ol&gt;
&lt;pre class="literal-block"&gt;
.



.
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt; Give me a matrix M that has this property:  for all vectors p,
&lt;span class="math"&gt;\(Mp =  \begin{pmatrix}2&amp;amp;3&amp;amp;1\end{pmatrix}  \times p\)&lt;/span&gt;. The operator is the vector cross product.&lt;/p&gt;
&lt;pre class="literal-block"&gt;
.









.
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt; In a fragment shader, a sampler2D does something more than a simple array lookup like you have in most programming languages.  What?&lt;/p&gt;
&lt;pre class="literal-block"&gt;
.








.
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/4&lt;/em&gt; Tell me about &lt;em&gt;view normalization&lt;/em&gt;.  What is it?   What is good about it?&lt;/p&gt;
&lt;pre class="literal-block"&gt;
.











.
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/4&lt;/em&gt; Compute the projection equations when the viewpoint is at (0,0,0) and the projection plane is 2x+y+z=4.   Use Cartesian coordinates.   You do not need to put the result into a matrix form, but simplify your result as much as possible.&lt;/p&gt;
&lt;pre class="literal-block"&gt;
.
















.
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt; Name the algorithm that was designed to rasterize a circle using only integer additions, subtractions, and shifts.&lt;/p&gt;
&lt;pre class="literal-block"&gt;
.








.
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt; In a shader, what is the difference between a uniform variable and a varying variable?&lt;/p&gt;
&lt;pre class="literal-block"&gt;
.








.
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt; Give 2 reasons why we usually use a sequence of low-degree curves instead of one high degree curve.&lt;/p&gt;
&lt;pre class="literal-block"&gt;
.








.
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt; What does the word &lt;em&gt;rational&lt;/em&gt; mean in NURBS?&lt;/p&gt;
&lt;pre class="literal-block"&gt;
.








.
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt; What is the difference between &lt;em&gt;Phong&lt;/em&gt; shading and &lt;em&gt;Gouraud&lt;/em&gt; shading?&lt;/p&gt;
&lt;pre class="literal-block"&gt;
.








.
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt; In the Phong lighting model, which computes the color or brightness of each pixel, how do you make a surface material more metallic or shiny?&lt;/p&gt;
&lt;pre class="literal-block"&gt;
.








.
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt;   Where is the 3D homogeneous point (1,0,0,0)?&lt;/p&gt;
&lt;pre class="literal-block"&gt;
.








.
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt; Consider a 2D cubic Bezier curve with Cartesian control points (0,0), (1,1), (2,2), (3,3).  What is the point at t=0.5?&lt;/p&gt;
&lt;pre class="literal-block"&gt;
.








.
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt;  Describe what the curve in the previous question looks like.&lt;/p&gt;
&lt;pre class="literal-block"&gt;
.








.
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt; What is &lt;em&gt;Constructive Solid Geometry&lt;/em&gt;?&lt;/p&gt;
&lt;pre class="literal-block"&gt;
.








.
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt; What texture mapping problem does the &lt;em&gt;mipmap&lt;/em&gt; solve?&lt;/p&gt;
&lt;pre class="literal-block"&gt;
.








.
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt;  Mathematically, the aliasing problem in CG&lt;/p&gt;
&lt;ol class="loweralpha simple"&gt;
&lt;li&gt;happens when high frequency signals are not sampled often enough.&lt;/li&gt;
&lt;li&gt;happens when low frequency signals are sampled too often.&lt;/li&gt;
&lt;li&gt;is a new problem that did not occur with the old displays.&lt;/li&gt;
&lt;li&gt;can be reduced by subsampling and averaging&lt;/li&gt;
&lt;li&gt;both (a) and (d).&lt;/li&gt;
&lt;/ol&gt;
&lt;pre class="literal-block"&gt;
.



.
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt; About polygon clipping:&lt;/p&gt;
&lt;ol class="loweralpha simple"&gt;
&lt;li&gt;A polygon might gain vertices.&lt;/li&gt;
&lt;li&gt;A polygon might gain area.&lt;/li&gt;
&lt;li&gt;If a polygon's vertices are all outside the clip region, then it may be deleted.&lt;/li&gt;
&lt;li&gt;Using a 6-stage pipeline keeps the latency the same.&lt;/li&gt;
&lt;li&gt;Concave polygons become convex.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre class="literal-block"&gt;
.



.
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt;   A small light source that is twice as far away is 1/4 as bright.  That is, there is an inverse square fall off for brightness.     However, when modeling light in graphics, we usually don't do that.  Why?&lt;/p&gt;
&lt;pre class="literal-block"&gt;
.






.
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt; What tool maps spectral colors into a human perceptual coordinate system?  Your use it to determine the visual result of mixing colors.&lt;/p&gt;
&lt;pre class="literal-block"&gt;
.


.
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt; With a B-spline, the joints are usually invisible because the two segments meet with C2 continuity.   Sometimes a designer may want there to be a visible kink at a joint, i.e., wants only C0 continuity.   How can that be achieved?&lt;/p&gt;
&lt;pre class="literal-block"&gt;
.



.
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt; What's the hardest part of implementing the painters algorithm?&lt;/p&gt;
&lt;pre class="literal-block"&gt;
.



.
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt; Consider a cube.  It has both geometry and topology.  What is the geometry and what is the topology?&lt;/p&gt;
&lt;pre class="literal-block"&gt;
.






.
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt; Name the javascript  WebGL function that sets the current buffer for future buffer operations.&lt;/p&gt;
&lt;pre class="literal-block"&gt;
.



.
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;_____/2&lt;/em&gt; Name the javascript  WebGL function that   declares that the current buffer contains 3 floats per vertex (or generally some number of some type per vertex).&lt;/p&gt;
&lt;pre class="literal-block"&gt;
.



.
&lt;/pre&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;em&gt;End of final exam.  Total: 76 points.&lt;/em&gt;&lt;/p&gt;&lt;/div&gt;</description><category>exam</category><category>mathjax</category><guid>https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/posts/finalexam/</guid><pubDate>Mon, 17 Dec 2018 05:00:00 GMT</pubDate></item><item><title>CG Class 30, Wed 2018-12-12</title><link>https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/posts/class30/</link><dc:creator>W Randolph Franklin, RPI</dc:creator><description>&lt;div&gt;&lt;p&gt;Review before final exam.&lt;/p&gt;
&lt;!-- used up to 2017 class 31, some of 32 --&gt;&lt;/div&gt;</description><category>class</category><category>mathjax</category><guid>https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/posts/class30/</guid><pubDate>Tue, 11 Dec 2018 05:00:00 GMT</pubDate></item><item><title>CG Class 29, Mon 2018-12-10</title><link>https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/posts/class29/</link><dc:creator>W Randolph Franklin, RPI</dc:creator><description>&lt;div&gt;&lt;div class="section" id="presentation-of-student-videos"&gt;
&lt;h2&gt;Presentation of student videos&lt;/h2&gt;
&lt;/div&gt;
&lt;div class="section" id="review"&gt;
&lt;h2&gt;Review?&lt;/h2&gt;
&lt;p&gt;Do you want a review in the Wed lab session?&lt;/p&gt;
&lt;!-- used up to 2017 class 31, some of 32 --&gt;
&lt;/div&gt;&lt;/div&gt;</description><category>class</category><category>mathjax</category><guid>https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/posts/class29/</guid><pubDate>Sun, 09 Dec 2018 05:00:00 GMT</pubDate></item><item><title>CG Class 28, Thurs 2018-12-06</title><link>https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/posts/class28/</link><dc:creator>W Randolph Franklin, RPI</dc:creator><description>&lt;div&gt;&lt;div class="contents topic" id="table-of-contents"&gt;
&lt;p class="topic-title first"&gt;Table of contents&lt;/p&gt;
&lt;ul class="auto-toc simple"&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/posts/class28/#siggraph-2018-videos" id="id1"&gt;1   SIGGRAPH 2018 Videos&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class="section" id="siggraph-2018-videos"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/posts/class28/#id1"&gt;1   SIGGRAPH 2018 Videos&lt;/a&gt;&lt;/h2&gt;
&lt;ol class="arabic"&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;a class="reference external" href="https://www.youtube.com/watch?v=X-jqwZRQVmQ"&gt;Takeaways From SIGGRAPH 2018&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a class="reference external" href="https://techgage.com/article/takeaways-from-an-action-packed-siggraph-2018/"&gt;Article&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;a class="reference external" href="https://www.youtube.com/watch?v=t952yS8tcg8"&gt;Technical Papers Preview&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;a class="reference external" href="https://www.youtube.com/watch?v=x8Fo2slT2WA"&gt;Advanced Molecular &amp;amp; Particle Physics Simulations&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;a class="reference external" href="https://www.youtube.com/watch?v=tjf-1BxpR9c"&gt;NVIDIA RTX and GameWorks Ray Tracing Technology Demonstration&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;a class="reference external" href="https://www.youtube.com/watch?v=SrF4k6wJ-do"&gt;Beyond Turing - Ray Tracing and the Future of Computer Graphics&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;a class="reference external" href="https://www.youtube.com/watch?v=G5GzWhSgKCE"&gt;Create Realistic Character Animation with Ziva Dynamics&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;a class="reference external" href="https://www.youtube.com/watch?v=xvyGpBKevLM"&gt;A Multi-Scale Model for Simulating Liquid-Fabric Interactions&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;a class="reference external" href="https://www.youtube.com/watch?v=jY28N0kv7Pk"&gt;NVIDIA CEO Jensen Huang - Reinventing Computer Graphics&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;!-- used up to 2017 class 31, some of 32 --&gt;
&lt;/div&gt;&lt;/div&gt;</description><category>class</category><category>mathjax</category><guid>https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/posts/class28/</guid><pubDate>Wed, 05 Dec 2018 05:00:00 GMT</pubDate></item><item><title>CG Class 27, Mon 2018-12-03</title><link>https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/posts/class27/</link><dc:creator>W Randolph Franklin, RPI</dc:creator><description>&lt;div&gt;&lt;div class="contents topic" id="table-of-contents"&gt;
&lt;p class="topic-title first"&gt;Table of contents&lt;/p&gt;
&lt;ul class="auto-toc simple"&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/posts/class27/#opengl-in-guha-vs-webgl-in-angel" id="id1"&gt;1   OpenGL in Guha vs WebGL in Angel&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/posts/class27/#chapter-15-slides" id="id2"&gt;2   Chapter 15 slides&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/posts/class27/#introduction-to-gpus" id="id3"&gt;3   Introduction to GPUs&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class="section" id="opengl-in-guha-vs-webgl-in-angel"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/posts/class27/#id1"&gt;1   OpenGL in Guha vs WebGL in Angel&lt;/a&gt;&lt;/h2&gt;
&lt;ol class="arabic"&gt;
&lt;li&gt;&lt;p class="first"&gt;Guha, the text I used before Angel, uses OpenGL.  Angel uses WebGL.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;OpenGL has a C API; WebGL uses Javascript.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;That OpenGL is the obsolete version 2; WebGL is based on the current OpenGL 3.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;OpenGL 2 has an immediate mode design: you draw things and they are forgotten.&lt;/p&gt;
&lt;p&gt;In WebGL you send buffers to the GPU and then draw them.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;OpenGL has compute shaders and geometry shaders.   They fill in points along Bezier curves and draw trimmed NURBS.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;A NURBS surface is a 2D parametric surface in 3D (or 4D if homogeneous).&lt;/p&gt;
&lt;p&gt;A trim line is a 1D parametric curve in the the 2D parameter space of the surface.&lt;/p&gt;
&lt;p&gt;The trim lines cut around the outside of the desired region and also cut out holes.&lt;/p&gt;
&lt;p&gt;This is a powerful technique.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div class="section" id="chapter-15-slides"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/posts/class27/#id2"&gt;2   Chapter 15 slides&lt;/a&gt;&lt;/h2&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;You do not need to learn most of those slides.  Later I'll summarize what you need.&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="https://wrf.ecse.rpi.edu/Teaching/graphics/SEVENTH_EDITION/PPT/WEEK15/Angel_UNM_14_15_1.ppt"&gt;15_1 Global rendering&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="https://wrf.ecse.rpi.edu/Teaching/graphics/SEVENTH_EDITION/PPT/WEEK15/Angel_UNM_14_15_2.ppt"&gt;15_2 Ray tracing&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="https://wrf.ecse.rpi.edu/Teaching/graphics/SEVENTH_EDITION/PPT/WEEK15/Angel_UNM_14_15_3.ppt"&gt;15_3 What's next?&lt;/a&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div class="section" id="introduction-to-gpus"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/posts/class27/#id3"&gt;3   Introduction to GPUs&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;from &lt;a class="reference external" href="https://www.cs.utexas.edu/~pingali/CS378/2015sp/lectures/IntroGPUs.pdf"&gt;UT Computer Science&lt;/a&gt;&lt;/p&gt;
&lt;!-- used up to 2017 class 31, some of 32 --&gt;
&lt;/div&gt;&lt;/div&gt;</description><category>class</category><category>mathjax</category><guid>https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/posts/class27/</guid><pubDate>Sun, 02 Dec 2018 05:00:00 GMT</pubDate></item><item><title>CG Class 26, Thurs 2018-11-29</title><link>https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/posts/class26/</link><dc:creator>W Randolph Franklin, RPI</dc:creator><description>&lt;div&gt;&lt;div class="contents topic" id="table-of-contents"&gt;
&lt;p class="topic-title first"&gt;Table of contents&lt;/p&gt;
&lt;ul class="auto-toc simple"&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/posts/class26/#chapter-14-slides-ctd" id="id1"&gt;1   Chapter 14 slides ctd&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/posts/class26/#old-opengl-in-c-and-with-nurbs" id="id2"&gt;2   Old OpenGL in C and with NURBS&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/posts/class26/#webgl-query" id="id3"&gt;3   WebGL query&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class="section" id="chapter-14-slides-ctd"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/posts/class26/#id1"&gt;1   Chapter 14 slides ctd&lt;/a&gt;&lt;/h2&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;&lt;a class="reference external" href="https://wrf.ecse.rpi.edu/Teaching/graphics/SEVENTH_EDITION/PPT/WEEK14/Angel_UNM_14_14_2.ppt"&gt;14_2 Designing parametric cubic curves&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="https://wrf.ecse.rpi.edu/Teaching/graphics/SEVENTH_EDITION/PPT/WEEK14/Angel_UNM_14_14_3.ppt"&gt;14_3 Bezier and spline curves and surfaces&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="https://wrf.ecse.rpi.edu/Teaching/graphics/SEVENTH_EDITION/PPT/WEEK14/Angel_UNM_14_14_4.ppt"&gt;14_4 Rendering curves and surfaces&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="https://wrf.ecse.rpi.edu/Teaching/graphics/SEVENTH_EDITION/PPT/WEEK14/Angel_UNM_14_14_5.ppt"&gt;14_5 Rendering the teapot&lt;/a&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div class="section" id="old-opengl-in-c-and-with-nurbs"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/posts/class26/#id2"&gt;2   Old OpenGL in C and with NURBS&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Before Angel, I used another book, Guha.   It used old OpenGL in C.  However therefore it could show NURBS.  Some sample programs are in&lt;/p&gt;
&lt;p&gt;&lt;a class="reference external" href="https://wrf.ecse.rpi.edu/wiki/ComputerGraphicsFall2013/guha/Code"&gt;https://wrf.ecse.rpi.edu/wiki/ComputerGraphicsFall2013/guha/Code&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Look at bezierCurves, which shows moving control points.&lt;/p&gt;
&lt;p&gt;trimmedBicubicSplineSurface shows NURBS.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="webgl-query"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/posts/class26/#id3"&gt;3   WebGL query&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Victor Calvert writes,&lt;/p&gt;
&lt;p&gt;The &lt;a class="reference external" href="http://webglreport.com/"&gt;WebGL report&lt;/a&gt; shows
current-environment specifics, including the maximum number of
textures, maximum framebuffer resolution, and other information,
retrieved via the WebGL API.&lt;/p&gt;
&lt;!-- used up to 2017 class 31, some of 32 --&gt;
&lt;/div&gt;&lt;/div&gt;</description><category>class</category><category>mathjax</category><guid>https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/posts/class26/</guid><pubDate>Thu, 29 Nov 2018 05:00:00 GMT</pubDate></item><item><title>CG Homework 11, due Mon 2018-12-03 2359</title><link>https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/posts/homework11/</link><dc:creator>W Randolph Franklin, RPI</dc:creator><description>&lt;div&gt;&lt;ol class="arabic"&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(2 pts)&lt;/em&gt; Computing the effect of light reflecting off of one diffuse surface onto the other surfaces in the scene is called:&lt;/p&gt;
&lt;ol class="upperalpha simple"&gt;
&lt;li&gt;Bitblt&lt;/li&gt;
&lt;li&gt;Bump mapping&lt;/li&gt;
&lt;li&gt;Environment mapping&lt;/li&gt;
&lt;li&gt;Radiosity&lt;/li&gt;
&lt;li&gt;Texture mapping&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(2 pts)&lt;/em&gt; Painting a image onto a face to simulate fine detail is called:&lt;/p&gt;
&lt;ol class="upperalpha simple"&gt;
&lt;li&gt;Bitblt&lt;/li&gt;
&lt;li&gt;Bump mapping&lt;/li&gt;
&lt;li&gt;Environment mapping&lt;/li&gt;
&lt;li&gt;Radiosity&lt;/li&gt;
&lt;li&gt;Texture mapping&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(2 pts)&lt;/em&gt; Pretending to alter the normal vectors to the surface during rendering is called:&lt;/p&gt;
&lt;ol class="upperalpha simple"&gt;
&lt;li&gt;Bitblt&lt;/li&gt;
&lt;li&gt;Bump mapping&lt;/li&gt;
&lt;li&gt;Environment mapping&lt;/li&gt;
&lt;li&gt;Radiosity&lt;/li&gt;
&lt;li&gt;Texture mapping&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(2 pts)&lt;/em&gt; Quickly copying blocks of pixels from one buffer to another is called:&lt;/p&gt;
&lt;ol class="upperalpha simple"&gt;
&lt;li&gt;Bitblt&lt;/li&gt;
&lt;li&gt;Bump mapping&lt;/li&gt;
&lt;li&gt;Environment mapping&lt;/li&gt;
&lt;li&gt;Radiosity&lt;/li&gt;
&lt;li&gt;Texture mapping&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(2 pts)&lt;/em&gt; Reflecting the objects around a shiny object onto its surface is called:&lt;/p&gt;
&lt;ol class="upperalpha simple"&gt;
&lt;li&gt;Bitblt&lt;/li&gt;
&lt;li&gt;Bump mapping&lt;/li&gt;
&lt;li&gt;Environment mapping&lt;/li&gt;
&lt;li&gt;Radiosity&lt;/li&gt;
&lt;li&gt;Texture mapping&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;em&gt;Answer: slides 9_3.&lt;/em&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(2 pts)&lt;/em&gt; Several coordinate systems are typically used in texture mapping.   Which one may be used to model curves and surfaces?&lt;/p&gt;
&lt;ol class="upperalpha simple"&gt;
&lt;li&gt;Lagrangian coordinates&lt;/li&gt;
&lt;li&gt;Object or World Coordinates&lt;/li&gt;
&lt;li&gt;Parametric coordinates&lt;/li&gt;
&lt;li&gt;Texture coordinates&lt;/li&gt;
&lt;li&gt;Window Coordinates&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(2 pts)&lt;/em&gt; Which one is used to identify points in the image to be mapped?&lt;/p&gt;
&lt;ol class="upperalpha simple"&gt;
&lt;li&gt;Lagrangian coordinates&lt;/li&gt;
&lt;li&gt;Object or World Coordinates&lt;/li&gt;
&lt;li&gt;Parametric coordinates&lt;/li&gt;
&lt;li&gt;Texture coordinates&lt;/li&gt;
&lt;li&gt;Window Coordinates&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(2 pts)&lt;/em&gt; Which one is conceptually, where the mapping takes place?&lt;/p&gt;
&lt;ol class="upperalpha simple"&gt;
&lt;li&gt;Lagrangian coordinates&lt;/li&gt;
&lt;li&gt;Object or World Coordinates&lt;/li&gt;
&lt;li&gt;Parametric coordinates&lt;/li&gt;
&lt;li&gt;Texture coordinates&lt;/li&gt;
&lt;li&gt;Window Coordinates&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(2 pts)&lt;/em&gt; Which one is where the final image is really produced?&lt;/p&gt;
&lt;ol class="upperalpha simple"&gt;
&lt;li&gt;Lagrangian coordinates&lt;/li&gt;
&lt;li&gt;Object or World Coordinates&lt;/li&gt;
&lt;li&gt;Parametric coordinates&lt;/li&gt;
&lt;li&gt;Texture coordinates&lt;/li&gt;
&lt;li&gt;Window Coordinates&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;em&gt;Answers: slide 9_4_5.&lt;/em&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(2 pts)&lt;/em&gt; Mathematically, the aliasing problem in CG&lt;/p&gt;
&lt;ol class="upperalpha simple"&gt;
&lt;li&gt;happens when high frequency signals are not sampled often enough.&lt;/li&gt;
&lt;li&gt;happens when low frequency signals are sampled too often.&lt;/li&gt;
&lt;li&gt;is a new problem that did not occur with the old displays.&lt;/li&gt;
&lt;li&gt;can be reduced by subsampling and averaging&lt;/li&gt;
&lt;li&gt;both 1 and 4.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(2 pts)&lt;/em&gt; When you add many images together to blend them, there may be problems: (10_3)&lt;/p&gt;
&lt;ol class="upperalpha simple"&gt;
&lt;li&gt;Loss of accuracy if each color has only 8 bits.&lt;/li&gt;
&lt;li&gt;You can't do this at all in WebGL.&lt;/li&gt;
&lt;li&gt;This requires using a color buffer of at least 4096x4096.&lt;/li&gt;
&lt;li&gt;This requires a stencil buffer.&lt;/li&gt;
&lt;li&gt;This requires that the A component be set to 0.0.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(2 pts)&lt;/em&gt; Fog has been removed from OpenGL, and is not in WebGL, because: (10_3)&lt;/p&gt;
&lt;ol class="upperalpha simple"&gt;
&lt;li&gt;The several possible fog factors (linear, exponential, gaussian) were too confusing.&lt;/li&gt;
&lt;li&gt;With cleaner air, we no longer want to model smog.&lt;/li&gt;
&lt;li&gt;It executed too slowly.&lt;/li&gt;
&lt;li&gt;Removing it simplified the standard, and anyway you can implement it yourself.&lt;/li&gt;
&lt;li&gt;It wasn't removed; it's still part of WebGL.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(2 pts)&lt;/em&gt; What does sampler2D do? (10_4)&lt;/p&gt;
&lt;ol class="upperalpha simple"&gt;
&lt;li&gt;Return a sample random variable from a probability distribution.&lt;/li&gt;
&lt;li&gt;Return one specific texel from a texture map.&lt;/li&gt;
&lt;li&gt;Return a point on a bezier curve by interpolating control points.&lt;/li&gt;
&lt;li&gt;Interpoint a texture value from nearby texels.&lt;/li&gt;
&lt;li&gt;Compute a phong-shaded color.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(2 pts)&lt;/em&gt; Rendering a scene by computing which pixels are colored by each object is called (12_5)&lt;/p&gt;
&lt;ol class="upperalpha simple"&gt;
&lt;li&gt;Image space approach&lt;/li&gt;
&lt;li&gt;Modelview space approach&lt;/li&gt;
&lt;li&gt;Object space approach&lt;/li&gt;
&lt;li&gt;Pixel space approach&lt;/li&gt;
&lt;li&gt;Viewport space approach&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(2 pts)&lt;/em&gt; Rendering a scene by computing which objects are behind each pixel is called (12_5)&lt;/p&gt;
&lt;ol class="upperalpha simple"&gt;
&lt;li&gt;Image space approach&lt;/li&gt;
&lt;li&gt;Modelview space approach&lt;/li&gt;
&lt;li&gt;Object space approach&lt;/li&gt;
&lt;li&gt;Pixel space approach&lt;/li&gt;
&lt;li&gt;Viewport space approach&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(2 pts)&lt;/em&gt; Cohen-Sutherland clipping (13_1)&lt;/p&gt;
&lt;ol class="upperalpha simple"&gt;
&lt;li&gt;Clips faces fast by doing concave faces properly.&lt;/li&gt;
&lt;li&gt;Clips faces fast by normalizing the projection first.&lt;/li&gt;
&lt;li&gt;Clips lines fast by eliminating many simple cases quickly.&lt;/li&gt;
&lt;li&gt;Clips lines fast by using the fact the current CPUs do division fast.&lt;/li&gt;
&lt;li&gt;Clips textures fast with a mipmap.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(2 pts)&lt;/em&gt; View normalization (13_1)&lt;/p&gt;
&lt;ol class="upperalpha simple"&gt;
&lt;li&gt;Makes the clip region into a cube but changes object cubes into parallelepipeds.&lt;/li&gt;
&lt;li&gt;Preserves angles and distances.&lt;/li&gt;
&lt;li&gt;Preserves angles but not distances.&lt;/li&gt;
&lt;li&gt;Preserves distances but not angles.&lt;/li&gt;
&lt;li&gt;Was obsoleted by fast CPUs.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(2 pts)&lt;/em&gt; About polygon clipping:  (13_2)&lt;/p&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;A polygon might gain vertices.&lt;/li&gt;
&lt;li&gt;A polygon might gain area.&lt;/li&gt;
&lt;li&gt;If a polygon's vertices are all outside the clip region, then it may be deleted.&lt;/li&gt;
&lt;li&gt;Using a 6-stage pipeline keeps the latency the same.&lt;/li&gt;
&lt;li&gt;Concave polygons become convex.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(2 pts)&lt;/em&gt; From his profits from SGI, Netscape, and other startups, Jim Clark bought the world's &lt;em&gt;XXX&lt;/em&gt; largest yacht.&lt;/p&gt;
&lt;ol class="upperalpha simple"&gt;
&lt;li&gt;1st&lt;/li&gt;
&lt;li&gt;2nd&lt;/li&gt;
&lt;li&gt;3rd&lt;/li&gt;
&lt;li&gt;4th&lt;/li&gt;
&lt;li&gt;5th&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(2 pts)&lt;/em&gt; Which hidden surface algorithm sorts objects back-to-front? (13_2)&lt;/p&gt;
&lt;ol class="upperalpha simple"&gt;
&lt;li&gt;BSP tree&lt;/li&gt;
&lt;li&gt;depth (Z) buffer&lt;/li&gt;
&lt;li&gt;image space&lt;/li&gt;
&lt;li&gt;painter's&lt;/li&gt;
&lt;li&gt;scan line&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(2 pts)&lt;/em&gt; Which hidden surface algorithm preprocesses objects into a tree so that you can change the viewpoint and then render by traversing the tree in a different order?  (13_2)&lt;/p&gt;
&lt;ol class="upperalpha simple"&gt;
&lt;li&gt;BSP tree&lt;/li&gt;
&lt;li&gt;depth (Z) buffer&lt;/li&gt;
&lt;li&gt;image space&lt;/li&gt;
&lt;li&gt;painter's&lt;/li&gt;
&lt;li&gt;scan line&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(2 pts)&lt;/em&gt; Which hidden surface algorithm might send its output straight to a display like a CRT w/o ever storing the whole image?  (13_2)&lt;/p&gt;
&lt;ol class="upperalpha simple"&gt;
&lt;li&gt;BSP tree&lt;/li&gt;
&lt;li&gt;depth (Z) buffer&lt;/li&gt;
&lt;li&gt;image space&lt;/li&gt;
&lt;li&gt;painter's&lt;/li&gt;
&lt;li&gt;scan line&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(2 pts)&lt;/em&gt; Some colors that you can see on your display cannot be printed, and vv.  Why?  (13_4)&lt;/p&gt;
&lt;ol class="upperalpha simple"&gt;
&lt;li&gt;Purple is not a pure spectral color.&lt;/li&gt;
&lt;li&gt;The UV emitted by the display fades the printer paper.&lt;/li&gt;
&lt;li&gt;The display and printer's gamuts don't match.&lt;/li&gt;
&lt;li&gt;The printer has 4 inks but the display only 3 primaries.&lt;/li&gt;
&lt;li&gt;There's no such thing as a standard display - different manufacturers have different notions of &lt;em&gt;red&lt;/em&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(2 pts)&lt;/em&gt; What is happening in the following code that is part of a picking program that we saw (11_4):&lt;/p&gt;
&lt;pre class="literal-block"&gt;
if(i==0) gl_FragColor = c[0];
  else if(i==1) gl_FragColor = c[1];
  else if(i==2) gl_FragColor = c[2];
  else if(i==3) gl_FragColor = c[3];
  else if(i==4) gl_FragColor = c[4];
  else if(i==5) gl_FragColor = c[5];
  else if(i==6) gl_FragColor = c[6];
&lt;/pre&gt;
&lt;ol class="upperalpha simple"&gt;
&lt;li&gt;This assigns to each pixel the number that we'd like returned if the user clicks on that pixel.&lt;/li&gt;
&lt;li&gt;This assigns to each pixel the true color of that polygon.&lt;/li&gt;
&lt;li&gt;This keeps track of how many times the user clicked on that pixel.&lt;/li&gt;
&lt;li&gt;This notes how many vertices that polygon has.&lt;/li&gt;
&lt;li&gt;This notes the shininess exponent for that face.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(2 pts)&lt;/em&gt; Radiosity is better than ray tracing when the scene is all&lt;/p&gt;
&lt;ol class="upperalpha simple"&gt;
&lt;li&gt;diffuse objects&lt;/li&gt;
&lt;li&gt;objects outside the viewing region&lt;/li&gt;
&lt;li&gt;objects that are very close to the viewpoint&lt;/li&gt;
&lt;li&gt;specular objects&lt;/li&gt;
&lt;li&gt;very small objects&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(2 pts)&lt;/em&gt; Ray tracing is better than radiosity when the scene is all&lt;/p&gt;
&lt;ol class="upperalpha simple"&gt;
&lt;li&gt;diffuse objects&lt;/li&gt;
&lt;li&gt;objects outside the viewing region&lt;/li&gt;
&lt;li&gt;objects that are very close to the viewpoint&lt;/li&gt;
&lt;li&gt;specular objects&lt;/li&gt;
&lt;li&gt;very small objects&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(2 pts)&lt;/em&gt; Firing multiple rays through each pixel handles the problem of&lt;/p&gt;
&lt;ol class="upperalpha simple"&gt;
&lt;li&gt;diffuse objects&lt;/li&gt;
&lt;li&gt;objects outside the viewing region&lt;/li&gt;
&lt;li&gt;objects that are very close to the viewpoint&lt;/li&gt;
&lt;li&gt;specular objects&lt;/li&gt;
&lt;li&gt;very small objects&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(2 pts)&lt;/em&gt; Consider a 2D Cartesian cubic Bezier curve with these control points:  (0,0), (0,1), (1,1), (1,0).
What is the point at t=0?   OK to look up the formula.&lt;/p&gt;
&lt;ol class="upperalpha simple"&gt;
&lt;li&gt;(0,0)&lt;/li&gt;
&lt;li&gt;(0,1)&lt;/li&gt;
&lt;li&gt;(1,0)&lt;/li&gt;
&lt;li&gt;(1/2, 3/4)&lt;/li&gt;
&lt;li&gt;(1/2,1)&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(2 pts)&lt;/em&gt; What is the point at t=1/2?&lt;/p&gt;
&lt;ol class="upperalpha simple"&gt;
&lt;li&gt;(0,0)&lt;/li&gt;
&lt;li&gt;(0,1)&lt;/li&gt;
&lt;li&gt;(1,0)&lt;/li&gt;
&lt;li&gt;(1/2, 3/4)&lt;/li&gt;
&lt;li&gt;(1/2,1)&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(2 pts)&lt;/em&gt; What is the point at t=1?&lt;/p&gt;
&lt;ol class="upperalpha simple"&gt;
&lt;li&gt;(0,0)&lt;/li&gt;
&lt;li&gt;(0,1)&lt;/li&gt;
&lt;li&gt;(1,0)&lt;/li&gt;
&lt;li&gt;(1/2, 3/4)&lt;/li&gt;
&lt;li&gt;(1/2,1)&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(2 pts)&lt;/em&gt; If you interpolate a curve through a list of control points instead of approximating a curve near the points, then what happens?&lt;/p&gt;
&lt;ol class="upperalpha simple"&gt;
&lt;li&gt;It will not be possible to join two curves and match the radii of curvature.&lt;/li&gt;
&lt;li&gt;The calculations to compute the curve will take impossibly long.&lt;/li&gt;
&lt;li&gt;The curve will stay within the convex hull of the control points.&lt;/li&gt;
&lt;li&gt;The curve will swing outside the convex hull of the control points.&lt;/li&gt;
&lt;li&gt;This isn't possible for curves of odd degree.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(2 pts)&lt;/em&gt; If you use quadratic Bezier curves, then what happens?&lt;/p&gt;
&lt;ol class="upperalpha simple"&gt;
&lt;li&gt;It will not be possible to join two curves and match the radii of curvature.&lt;/li&gt;
&lt;li&gt;The calculations to compute the curve will take impossibly long.&lt;/li&gt;
&lt;li&gt;The curve will stay within the convex hull of the control points.&lt;/li&gt;
&lt;li&gt;The curve will swing outside the convex hull of the control points.&lt;/li&gt;
&lt;li&gt;This isn't possible for curves of even degree.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;em&gt;(Total: 64 points.)&lt;/em&gt;&lt;/p&gt;&lt;/div&gt;</description><category>homework</category><category>mathjax</category><guid>https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/posts/homework11/</guid><pubDate>Mon, 26 Nov 2018 05:00:00 GMT</pubDate></item><item><title>CG Class 25, Mon 2018-11-26</title><link>https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/posts/class25/</link><dc:creator>W Randolph Franklin, RPI</dc:creator><description>&lt;div&gt;&lt;div class="contents topic" id="table-of-contents"&gt;
&lt;p class="topic-title first"&gt;Table of contents&lt;/p&gt;
&lt;ul class="auto-toc simple"&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/posts/class25/#acm-sigspatial-gis-cup-1st-place" id="id1"&gt;1   ACM SIGSPATIAL GIS Cup 1st place&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/posts/class25/#chapter-13-slides-ctd" id="id2"&gt;2   Chapter 13 slides ctd&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/posts/class25/#chapter-14" id="id3"&gt;3   Chapter 14&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/posts/class25/#chapter-14-slides" id="id4"&gt;4   Chapter 14 slides&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class="section" id="acm-sigspatial-gis-cup-1st-place"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/posts/class25/#id1"&gt;1   ACM SIGSPATIAL GIS Cup 1st place&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a class="reference external" href="http://sigspatial2018.sigspatial.org/giscup2018/results"&gt;Here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In 2016, we won &lt;a class="reference external" href="http://sigspatial2016.sigspatial.org/giscup2016/results"&gt;2nd&lt;/a&gt;.  We also won 2nd in 2015.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="chapter-13-slides-ctd"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/posts/class25/#id2"&gt;2   Chapter 13 slides ctd&lt;/a&gt;&lt;/h2&gt;
&lt;ol class="arabic"&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;a class="reference external" href="https://wrf.ecse.rpi.edu/Teaching/graphics/SEVENTH_EDITION/PPT/WEEK13/Angel_UNM_14_13_4.ppt"&gt;13_4 Display issues&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;We've seen some of this.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div class="section" id="chapter-14"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/posts/class25/#id3"&gt;3   Chapter 14&lt;/a&gt;&lt;/h2&gt;
&lt;ol class="arabic"&gt;
&lt;li&gt;&lt;p class="first"&gt;Curves are the next chapter of Angel.  WebGL does this worse than full OpenGL.  Here is a summary.
Big questions:&lt;/p&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;What math to use?&lt;/li&gt;
&lt;li&gt;How should the designer design a curve?&lt;/li&gt;
&lt;li&gt;My notes on &lt;a class="reference external" href="https://wrf.ecse.rpi.edu/p/77-sorsa92-bezier.pdf"&gt;Bezier curves&lt;/a&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Partial summary:&lt;/p&gt;
&lt;ol class="arabic"&gt;
&lt;li&gt;&lt;p class="first"&gt;To represent curves, use parametric (not explicit or implicit) equations.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Use connected strings or segments of low-degree curves, not one hi-degree curve.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;If the adjacent segments match tangents and curvatures at their common joint, then the joint is invisible.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;That requires at least cubic equations.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Higher degree equations are rarely used because they have bad properties such as:&lt;/p&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;less local control.   Changing one control point of a hi-degree curve changes the whole curve.   Parts of the curve distant from that point may move a lot.   This makes designing a desired curve impossible.&lt;/li&gt;
&lt;li&gt;numerical instability.   Small changes in coefficients cause large changes in the curve, even if computations are exact.&lt;/li&gt;
&lt;li&gt;roundoff error.  Computations are not exact.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;See my note on &lt;a class="reference external" href="http://wrf.ecse.rpi.edu/pmwiki/Research/HiDegreePolynomials"&gt;Hi Degree Polynomials&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;One 2D cartesian parametric cubic curve segment has 8 d.f. in 2D (12 in 3D).&lt;/p&gt;
&lt;p&gt;&lt;span class="math"&gt;\(x(t) = \sum_{i=0}^3 a_i t^i\)&lt;/span&gt;,&lt;/p&gt;
&lt;p&gt;&lt;span class="math"&gt;\(y(t) = \sum_{i=0}^3 b_i t^i\)&lt;/span&gt;, for &lt;span class="math"&gt;\(0\le t\le1\)&lt;/span&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Requiring the graphic designer to enter those coefficients would be
unpopular, so other APIs are common.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Most common is the &lt;em&gt;Bezier&lt;/em&gt; formulation, where the segment is
specified by 4 control points, which also total 8 d.f.: P0, P1, P2, and
P3.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;The generated curve starts at P0, goes near P1 and P2, and ends at P3.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;The curve stays inside the control polygon, the convex hull
of the control points.  A flatter control polygon means a
flatter curve.  Designers like this.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;A choice not taken would be to have the generated curve also go thru P2
and P3.  That's called a Catmull-Rom-Oberhauser curve.  However that
would force the curve to go outside the control polygon by a
nonintuitive amount.  That is considered undesirable.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Instead of 4 control points, a parametric cubic curve can also be specified by a
starting point and tangent, and an ending point and tangent.  That also
has 8 d.f.  It's called a Hermite curve.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;The three methods (polynomial, Bezier, Hermite) are easily interconvertible.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Remember that we're using connected strings or segments of cubic
curves, and if the adjacent segments match tangents and curvatures at
their common joint, then the joint is invisible.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Matching tangents (called &lt;span class="math"&gt;\(G^1\)&lt;/span&gt; or geometric continuity) is sufficient, and is weaker than matching the 1st derivative (&lt;span class="math"&gt;\(C^1\)&lt;/span&gt; or parametric continuity), since the 1st derivative has a direction (tangent) and a length.   Most people do &lt;span class="math"&gt;\(C^1\)&lt;/span&gt; because it's easier and good enough.  However &lt;span class="math"&gt;\(G^1\)&lt;/span&gt; gives you another degree of freedom to use in your design.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Similarly, matching the radius of curvature (&lt;span class="math"&gt;\(G^2\)&lt;/span&gt; or geometric continuity) is weaker than matching the 2nd derivative (&lt;span class="math"&gt;\(C^2\)&lt;/span&gt; or parametric continuity), but most people do parametric continuity.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Parametric continuity reduces each successive segment from 8 d.f. down to 2 d.f.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;This is called a B-spline.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;From a sequence of control points we generate a B-spline curve that is
piecewise cubic and goes near, but probably not thru, any control point
(except perhaps the ends).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Moving one control point moves the adjacent few spline pieces.  That is
called &lt;em&gt;local control&lt;/em&gt;.  Designers like it.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;One spline segment can be replaced by two spline segments that,
together, exactly draw the same curve.  However they, together, have
more control points for the graphic designer to move individually.  So
now the designer can edit smaller pieces of the total spline.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Extending this from 2D to 3D curves is obvious.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Extending to homogeneous coordinates is obvious.  Increasing a control
point's weight attracts the nearby part of the spline.  This is called
a &lt;em&gt;rational&lt;/em&gt; spline.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Making two control points coincide means that the curvature will not be
continuous at the adjacent joint.&lt;/p&gt;
&lt;p&gt;Making &lt;em&gt;three&lt;/em&gt; control points coincide means that the &lt;em&gt;tangent&lt;/em&gt;
will not be continuous at the adjacent joint.&lt;/p&gt;
&lt;p&gt;Making &lt;em&gt;four&lt;/em&gt; control points coincide means that the &lt;em&gt;curve&lt;/em&gt; will
not be continuous at the adjacent joint.&lt;/p&gt;
&lt;p&gt;Doing this is called making the curve (actually the knot sequence)
&lt;em&gt;Non-uniform&lt;/em&gt;.  (The knots are the values of the parameter for the joints.)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Putting all this together gives a non-uniform rational B-spline, or a &lt;em&gt;NURBS&lt;/em&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;A B-spline &lt;em&gt;surface&lt;/em&gt; is a grid of patches, each a bi-cubic parametric polynomial.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Each patch is controlled by a 4x4 grid of control points.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;When adjacent patches match tangents and curvatures, the joint edge is invisible.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;The surface math is an obvious extension of the curve math.&lt;/p&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;&lt;span class="math"&gt;\(x(u,v) = \sum_{i=0}^3\sum_{j=0}^3 a_{ij} u^i v^j\)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class="math"&gt;\(y, z\)&lt;/span&gt; are similar.&lt;/li&gt;
&lt;li&gt;One patch has 48 d.f. for Cartesian points, or 64 d.f. for homogeneous points, although most of those are used to establish
continuity with adjacent patches.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;My extra enrichment info on &lt;a class="reference external" href="//wrf.ecse.rpi.edu/pmwiki/Research/Splines"&gt;Splines&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;The program I showed earlier is robotArm is  &lt;a class="reference external" href="https://wrf.ecse.rpi.edu/Teaching/graphics/SEVENTH_EDITION/CODE/Code%20new/09/"&gt;Chapter 9&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;To run program figure there, you may first need to fix an error in figure.html.  Change &lt;em&gt;InitShaders&lt;/em&gt; to &lt;em&gt;initShaders&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Many of the textbook programs have errors that prevent them from running.   You can see them in the console log.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div class="section" id="chapter-14-slides"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/posts/class25/#id4"&gt;4   Chapter 14 slides&lt;/a&gt;&lt;/h2&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;&lt;a class="reference external" href="https://wrf.ecse.rpi.edu/Teaching/graphics/SEVENTH_EDITION/PPT/WEEK14/Angel_UNM_14_14_1.ppt"&gt;14_1 Curves and surfaces&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Programs drawing the &lt;a class="reference external" href="https://wrf.ecse.rpi.edu/Teaching/graphics/SEVENTH_EDITION/CODE/11/"&gt;Utah teapot&lt;/a&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;&lt;/div&gt;</description><category>class</category><category>mathjax</category><guid>https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/posts/class25/</guid><pubDate>Sun, 25 Nov 2018 05:00:00 GMT</pubDate></item><item><title>CG Class 24, Mon 2018-11-19</title><link>https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/posts/class24/</link><dc:creator>W Randolph Franklin, RPI</dc:creator><description>&lt;div&gt;&lt;div class="contents topic" id="table-of-contents"&gt;
&lt;p class="topic-title first"&gt;Table of contents&lt;/p&gt;
&lt;ul class="auto-toc simple"&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/posts/class24/#thanksgiving-trivia-questions" id="id2"&gt;1   Thanksgiving trivia questions&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/posts/class24/#nice-site-on-visualizing-quaternions" id="id3"&gt;2   Nice site on visualizing quaternions&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/posts/class24/#chapter-13-slides-ctd" id="id4"&gt;3   Chapter 13 slides ctd&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/posts/class24/#my-commentaries" id="id5"&gt;4   My commentaries&lt;/a&gt;&lt;ul class="auto-toc"&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/posts/class24/#clipping" id="id6"&gt;4.1   Clipping&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/posts/class24/#id1" id="id7"&gt;4.2   Polygon rendering&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/posts/class24/#visibility-methods" id="id8"&gt;4.3   Visibility methods&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/posts/class24/#textbook-programs" id="id9"&gt;5   Textbook programs&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class="section" id="thanksgiving-trivia-questions"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/posts/class24/#id2"&gt;1   Thanksgiving trivia questions&lt;/a&gt;&lt;/h2&gt;
&lt;ol class="loweralpha simple"&gt;
&lt;li&gt;When the native American &lt;a class="reference external" href="https://en.wikipedia.org/wiki/Squanto"&gt;Squanto&lt;/a&gt; greeted the Pilgrims in March 1621, what language did he use?&lt;/li&gt;
&lt;li&gt;Where had he learned it?&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div class="section" id="nice-site-on-visualizing-quaternions"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/posts/class24/#id3"&gt;2   Nice site on visualizing quaternions&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Lessons by Grant Sanderson, Technology by Ben Eater.&lt;/p&gt;
&lt;p&gt;&lt;a class="reference external" href="https://eater.net/quaternions"&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="chapter-13-slides-ctd"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/posts/class24/#id4"&gt;3   Chapter 13 slides ctd&lt;/a&gt;&lt;/h2&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;&lt;a class="reference external" href="https://wrf.ecse.rpi.edu/Teaching/graphics/SEVENTH_EDITION/PPT/WEEK13/Angel_UNM_14_13_2.ppt"&gt;13_2 Polygon rendering&lt;/a&gt;. Includes clipping polygons, hidden surface algorithms.&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="https://wrf.ecse.rpi.edu/Teaching/graphics/SEVENTH_EDITION/PPT/WEEK13/Angel_UNM_14_13_3.ppt"&gt;13_3 Rasterization&lt;/a&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div class="section" id="my-commentaries"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/posts/class24/#id5"&gt;4   My commentaries&lt;/a&gt;&lt;/h2&gt;
&lt;div class="section" id="clipping"&gt;
&lt;h3&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/posts/class24/#id6"&gt;4.1   Clipping&lt;/a&gt;&lt;/h3&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;Many of these algorithms were developed for HW w/o floating point, where
even integer multiplication was expensive.&lt;/li&gt;
&lt;li&gt;Efficiency is now less important in most cases (unless you're implementing in HW).&lt;/li&gt;
&lt;li&gt;The idea of clipping with a 6-stage pipeline is important.&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="http://en.wikipedia.org/wiki/James_H._Clark"&gt;Jim Clark&lt;/a&gt;, a prof at
Stanford, made a 12-stage pipeline using 12 copies of the same chip, and
then left Stanford to found SGI.&lt;ol class="loweralpha"&gt;
&lt;li&gt;Later he bankrolled Netscape and 2 other companies.&lt;/li&gt;
&lt;li&gt;More recently he had the world's &lt;a class="reference external" href="http://www.forbes.com/sites/ryanmac/2012/05/15/billionaire-jim-clark-seeks-more-than-100-million-for-two-superyachts/"&gt;4th largest yacht&lt;/a&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div class="section" id="id1"&gt;
&lt;h3&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/posts/class24/#id7"&gt;4.2   Polygon rendering&lt;/a&gt;&lt;/h3&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;My note on &lt;a class="reference external" href="http://www.ecse.rpi.edu/~wrf/Research/Short_Notes/bresenham.html"&gt;Bresenham Line and Circle Drawing&lt;/a&gt;.  Jack
Bresenham, then at IBM invented these very fast ways to draw lines and
circles with only integer addition and subtraction.  My note gives
step-by-step derivations by transforming slow and clear programs to fast and
obscure programs.&lt;/li&gt;
&lt;li&gt;My note on &lt;a class="reference external" href="http://www.ecse.rpi.edu/~wrf/Research/Short_Notes/polyfill.html"&gt;Two polygon filling algorithms&lt;/a&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div class="section" id="visibility-methods"&gt;
&lt;h3&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/posts/class24/#id8"&gt;4.3   Visibility methods&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Here's my summary of problems with the main methods:&lt;/p&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;&lt;em&gt;Painters:&lt;/em&gt;&lt;ol class="loweralpha"&gt;
&lt;li&gt;The painter's algorithm is tricky when faces are close in Z.&lt;/li&gt;
&lt;li&gt;Sorting the faces is hard and maybe impossible.  Then you must split
some faces.&lt;/li&gt;
&lt;li&gt;However sometimes some objects are always in front of some other
objects.  Then you can render the background before the foreground.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Z-buffer:&lt;/em&gt;&lt;ol class="loweralpha"&gt;
&lt;li&gt;Subpixel objects randomly appear and disappear (aliasing).&lt;/li&gt;
&lt;li&gt;Artifacts occur when objects are closer than their Z-extent across one
pixel.&lt;/li&gt;
&lt;li&gt;This happens on the edge where two faces meet.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;em&gt;BSP tree:&lt;/em&gt;&lt;ol class="loweralpha"&gt;
&lt;li&gt;In 3D, many faces must be split to build the tree.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;The scanline algorithm can feed data straight to the video D/A.  That was
popular decades ago before frame buffers existed.  It became popular again
when frame buffers are the slowest part of the pipeline.&lt;/li&gt;
&lt;li&gt;A real implementation, with a moving foreground and fixed background,
might combine techniques.&lt;/li&gt;
&lt;li&gt;References: wikipedia.&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="section" id="textbook-programs"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/posts/class24/#id9"&gt;5   Textbook programs&lt;/a&gt;&lt;/h2&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;&lt;a class="reference external" href="https://wrf.ecse.rpi.edu/Teaching/graphics/SEVENTH_EDITION/CODE/10/"&gt;Chapter 10 Mandlebrot&lt;/a&gt; showing serious computation in the fragment shader.&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;&lt;/div&gt;</description><category>class</category><guid>https://wrf.ecse.rpi.edu/Teaching/graphics-f2018/posts/class24/</guid><pubDate>Sun, 18 Nov 2018 05:00:00 GMT</pubDate></item></channel></rss>