<?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 2017, Rensselaer Polytechnic Institute (Posts about homework)</title><link>https://wrf.ecse.rpi.edu/Teaching/graphics-f2017/</link><description></description><atom:link href="https://wrf.ecse.rpi.edu/Teaching/graphics-f2017/categories/homework.xml" rel="self" type="application/rss+xml"></atom:link><language>en</language><lastBuildDate>Wed, 26 Sep 2018 20:40:03 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>CG Homework 6, due Mon 2017-10-30 2359 Solution</title><link>https://wrf.ecse.rpi.edu/Teaching/graphics-f2017/posts/homework6sol/</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;(4 pts)&lt;/em&gt;  Use the homogeneous matrix to project homogeneous points onto the plane x+3y+2z=4, with COP at the origin. What does the point (1,2,4,5) project to? Give the answer as a Cartesian point.&lt;/p&gt;
&lt;p&gt;From &lt;a class="reference external" href="https://wrf.ecse.rpi.edu/pmwiki/pmwiki.php/Main/HomogeneousCoords"&gt;https://wrf.ecse.rpi.edu/pmwiki/pmwiki.php/Main/HomogeneousCoords&lt;/a&gt; :&lt;/p&gt;
&lt;p&gt;Normalize the plane equation to &lt;span class="math"&gt;\(x/4 + 3/4 y + 1/2 z = 1\)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The matrix and point vector are &lt;span class="math"&gt;\(\begin{pmatrix}  1&amp;amp;   0&amp;amp;   0&amp;amp;  0\\  0&amp;amp;   1&amp;amp;   0&amp;amp;  0\\  0&amp;amp;   0&amp;amp;   1&amp;amp;  0\\ 1/4 &amp;amp; 3/4 &amp;amp; 1/2 &amp;amp; 0 \end{pmatrix} \begin{pmatrix} 1 \\ 2 \\ 4 \\ 5 \end{pmatrix}\)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Multiply to get &lt;span class="math"&gt;\(\begin{pmatrix} 1 \\ 2 \\ 4\\  15/4 \end{pmatrix}\)&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Converted to Cartesian gives &lt;span class="math"&gt;\(\begin{pmatrix} 4/15 \\ 8/15 \\ 16/15  \end{pmatrix}\)&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;You can check that this is on the plane.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(4 pts)&lt;/em&gt; Repeat the previous question with the COP changed to (1,1,1,1).&lt;/p&gt;
&lt;p&gt;The easiest way might be to translate (1,2,4,5) by -(1,1,1,1), project onto the translated plane, then translate the result back.&lt;/p&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;Homo (1,2,4,5) is Cart (1/5, 2/5, 4/5).&lt;/li&gt;
&lt;li&gt;The Cart COP is (1,1,1).  We will translate everything by (-1,-1,-1).&lt;/li&gt;
&lt;li&gt;(1/5, 2/5, 4/5) translates to (-4/5, -3/5, -1/5).&lt;/li&gt;
&lt;li&gt;The plane equation is changed by replacing x by x+1, y by y+1, z by z+1.  (Think about it.)&lt;/li&gt;
&lt;li&gt;x+3y+2z=4 becomes x+3y+2z = -2 becomes -x/2 - 3/2 y - z =1.&lt;/li&gt;
&lt;li&gt;Now multiply &lt;span class="math"&gt;\(\begin{pmatrix}  1&amp;amp;   0&amp;amp;   0&amp;amp;  0\\  0&amp;amp;   1&amp;amp;   0&amp;amp;  0\\  0&amp;amp;   0&amp;amp;   1&amp;amp;  0\\ -1/2 &amp;amp; -3/2 &amp;amp; -1 &amp;amp; 0 \end{pmatrix} \begin{pmatrix} -4 \\ -3 \\ -1 \\ 5 \end{pmatrix}\)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;That gives Homo (-4, -3, -1, 15/2) or Cart (-8/15, -6/15, -2/15).&lt;/li&gt;
&lt;li&gt;Translate it back by (1,1,1).&lt;/li&gt;
&lt;li&gt;The answer is (7/15, 9/15, 13/15).&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(6 pts)&lt;/em&gt; Do exercise 5.6 on page 272 of the text.&lt;/p&gt;
&lt;p&gt;This is harder than I expected, and so everyone will get full points.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(6 pts)&lt;/em&gt; &lt;em&gt;This question will take some thinking).&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Imagine that you have an infinitely large room illuminated
by one infinitely long row of point lights.  This figure
shows a side view of the room.&lt;/p&gt;
&lt;p&gt;The lights are &lt;strong&gt;h&lt;/strong&gt; above the floor and are 1
meter from each other.  Assume that the ceiling above the
lights is black and that no light reflects off of anything.&lt;/p&gt;
&lt;p&gt;An object at distance &lt;strong&gt;d&lt;/strong&gt; from a light gets illuminated
with a brightness &lt;span class="math"&gt;\(\frac{1}{d^2}\)&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Each point on the floor is illuminated by all the lights,
but more brightly by the closer lights.&lt;/p&gt;
&lt;p&gt;A point &lt;strong&gt;p&lt;/strong&gt; directly below a light will be a little
brighter than a point &lt;strong&gt;q&lt;/strong&gt; halfway between two such
points.  That is the problem --- we want the floor (at least
the part directly below the line of lights) to be evenly
lit, at least within 1%.&lt;/p&gt;
&lt;p&gt;However, the higher the line of lights, the more evenly the
floor will be lit.&lt;/p&gt;
&lt;p&gt;Your question is to tell us what is the minimum value for
&lt;strong&gt;h&lt;/strong&gt; so that the line of the floor below the line of
lights is evenly lit within 5%.&lt;/p&gt;
&lt;img alt="../../images/hw-lights.png" src="https://wrf.ecse.rpi.edu/Teaching/graphics-f2017/images/hw-lights.png"&gt;
&lt;p&gt;E.g., the brightness at &lt;strong&gt;p&lt;/strong&gt; is&lt;/p&gt;
&lt;p&gt;&lt;span class="math"&gt;\(b_p = \sum_{i=-\infty}^{\infty} \;\; {1}/{\left(h^2+i^2\right)}\)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Answer:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;There are several levels of possible solution, all acceptable.  The highest is to find the closed form solutions for the integrals.  The lowest is to find the numerical approximation for a specific h by summing 1000 terms, and the plotting the difference as a function of h.  Part of the point of this problem is that you have to first decide how to solve it.  I will use Mathematica, partly to demonstrate that it is useful in graphics.&lt;/p&gt;
&lt;p&gt;The brightness at &lt;strong&gt;q&lt;/strong&gt; is&lt;/p&gt;
&lt;p&gt;&lt;span class="math"&gt;\(b_q = {\sum_{i=-\infty}^{\infty}} \;\; {1}/{\left(h^2+(i+1/2)^2\right)}\)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;From Mathematica, &lt;span class="math"&gt;\(b_p = {\pi  \coth (\pi  h)}/{h}\)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="math"&gt;\(b_q = \left({\pi    \tanh (\pi  h)}/{h}\right)\)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="math"&gt;\(b_q/b_p = \tanh ^2(\pi  h)\)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The plot is this.  The X axis is the height of the lights.  The Y axis is the ration between the dimmest place on the floor and the brightest place.&lt;/p&gt;
&lt;img alt="../../files/hw6-light-ratio.png" src="https://wrf.ecse.rpi.edu/Teaching/graphics-f2017/files/hw6-light-ratio.png"&gt;
&lt;p&gt;The lesson from this plot is that the light variation smooths out really quickly as the ceiling gets higher.   Eyeballing, at h=.7, the variation is already only 5%.   Mathematica can calculate 0.69336.  Any number from .65 to .75 is acceptable for grading purposes.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;em&gt;(Total: 20 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-f2017/posts/homework6sol/</guid><pubDate>Thu, 23 Nov 2017 05:00:00 GMT</pubDate></item><item><title>CG Homework 7, due Mon 2017-11-20 2359</title><link>https://wrf.ecse.rpi.edu/Teaching/graphics-f2017/posts/homework7/</link><dc:creator>W Randolph Franklin, RPI</dc:creator><description>&lt;div&gt;&lt;ol class="arabic simple"&gt;
&lt;li&gt;&lt;em&gt;(10 pts)&lt;/em&gt; Look at Figures 6.37 and 6.38 on pages 310 and 311 of the textbook.   Write 50-100 words on why they look different.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;(10 pts)&lt;/em&gt; Look at Figure 6.39 on page 314 of the textbook.   What is it about the spheres that  the global model looks different from the local?&lt;/li&gt;
&lt;li&gt;&lt;em&gt;(10 pts)&lt;/em&gt; Consider the sphere &lt;span class="math"&gt;\(x^2+y^2+z^2=169\)&lt;/span&gt;.  What is the normal to the sphere at the point (3,12,-4)?   Be sure your normal is normalized.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;(10 pts)&lt;/em&gt;   Consider a block of glass with index of refraction 1.5.    Some light is shining straight down on it.  This is called normal incidence.    How much of the light reflects off the glass and how much transmits into the glass?   Hint: Use  Fresnel's law.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;(10 pts)&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;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;em&gt;(Total: 50 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-f2017/posts/homework7/</guid><pubDate>Sun, 12 Nov 2017 05:00:00 GMT</pubDate></item><item><title>CG Homework 6, due Mon 2017-10-30 2359</title><link>https://wrf.ecse.rpi.edu/Teaching/graphics-f2017/posts/homework6/</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;(4 pts)&lt;/em&gt;  Use the homogeneous matrix to project homogeneous points onto the plane x+3y+2z=4, with COP at the origin. What does the point (1,2,4,5) project to? Give the answer as a Cartesian point.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(4 pts)&lt;/em&gt; Repeat the previous question with the COP changed to (1,1,1,1).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(6 pts)&lt;/em&gt; Do exercise 5.6 on page 272 of the text,&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(6 pts)&lt;/em&gt; &lt;em&gt;This question will take some thinking).&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Imagine that you have an infinitely large room illuminated
by one infinitely long row of point lights.  This figure
shows a side view of the room.&lt;/p&gt;
&lt;p&gt;The lights are &lt;strong&gt;h&lt;/strong&gt; above the floor and are 1
meter from each other.  Assume that the ceiling above the
lights is black and that no light reflects off of anything.&lt;/p&gt;
&lt;p&gt;An object at distance &lt;strong&gt;d&lt;/strong&gt; from a light gets illuminated
with a brightness &lt;span class="math"&gt;\(\frac{1}{d^2}\)&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Each point on the floor is illuminated by all the lights,
but more brightly by the closer lights.&lt;/p&gt;
&lt;p&gt;A point &lt;strong&gt;p&lt;/strong&gt; directly below a light will be a little
brighter than a point &lt;strong&gt;q&lt;/strong&gt; halfway between two such
points.  That is the problem --- we want the floor (at least
the part directly below the line of lights) to be evenly
lit, at least within 1%.&lt;/p&gt;
&lt;p&gt;However, the higher the line of lights, the more evenly the
floor will be lit.&lt;/p&gt;
&lt;p&gt;Your question is to tell us what is the minimum value for
&lt;strong&gt;h&lt;/strong&gt; so that the line of the floor below the line of
lights is evenly lit within 5%.&lt;/p&gt;
&lt;img alt="../../images/hw-lights.png" src="https://wrf.ecse.rpi.edu/Teaching/graphics-f2017/images/hw-lights.png"&gt;
&lt;p&gt;E.g., the brightness at &lt;strong&gt;p&lt;/strong&gt; is&lt;/p&gt;
&lt;p&gt;&lt;span class="math"&gt;\(\sum_{i=-\infty}^{\infty} \;\; \frac{1}{\left(h^2+i^2\right)}\)&lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;em&gt;(Total: 20 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-f2017/posts/homework6/</guid><pubDate>Mon, 23 Oct 2017 04:00:00 GMT</pubDate></item><item><title>CG Homework 5, due Mon 2017-10-16 2359</title><link>https://wrf.ecse.rpi.edu/Teaching/graphics-f2017/posts/homework5/</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; What is the angle (in degrees) between these two vectors: (1,2,0), (1,2,3)?&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(2 pts)&lt;/em&gt; (Reverse engineering rotations) In 2D, if the point (4,2) rotates about the origin to (2,-4), what's the angle?&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(2 pts)&lt;/em&gt; Give the matrix M that has this property: for all vectors p, &lt;span class="math"&gt;\(Mp = \begin{pmatrix}2\\4\\5\end{pmatrix} \times p\)&lt;/span&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(2 pts)&lt;/em&gt; Give the matrix M that has this property: for all vectors p,
&lt;span class="math"&gt;\(Mp = \left( \begin{pmatrix}2\\4\\5\end{pmatrix} \cdot p \right) \begin{pmatrix}2\\4\\5\end{pmatrix}\)&lt;/span&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(2 pts)&lt;/em&gt; Why can the following not possibly be a 3D Cartesian rotation matrix?&lt;/p&gt;
&lt;p&gt;&lt;span class="math"&gt;\(\begin{pmatrix}  3&amp;amp; 0 &amp;amp;0\\1 &amp;amp; 0 &amp;amp;0\\0&amp;amp; 0 &amp;amp;1\end{pmatrix}\)&lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(2 pts)&lt;/em&gt; Use any method (not involving soliciting answers on the internet) to rotate the point (4,4,6) by 120 degrees about the axis (2,2,3).   Explain your method.  (E.g., if you saw the answer in a vision, are your visions generally accurate?)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(2 pts)&lt;/em&gt; Can the volume of a small cube change when its vertices are rotated? (yes or no).  Why (not)?&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(2 pts)&lt;/em&gt; What is the ''event loop''?&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(2 pts)&lt;/em&gt; Why does putting all your vertices into an array and telling OpenGL about it make a big graphics program faster?&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(2 pts)&lt;/em&gt; Since the Z (aka depth) buffer looks so useful, why is it not enabled by default?&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(2 pts)&lt;/em&gt; What's the quaternion representing a rotation of 180 degrees about the axis (0,1,0)?&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(2 pts)&lt;/em&gt; Use the quaternion formulation to rotate the point (0,1,0) by 180 degrees about the axis (0,1,0).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(2 pts)&lt;/em&gt; Use the vector formulation to rotate the point (0,1,0) by 180 degrees about the axis (0,1,0).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(14)&lt;/em&gt; Extend your program from last week that displays the Starship Enterprise as follows:&lt;/p&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;Do the rotation in the vertex shader instead of in the javascript program.&lt;/li&gt;
&lt;li&gt;Make the color of each pixel depend on its z-value.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;em&gt;(Total: 40 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-f2017/posts/homework5/</guid><pubDate>Thu, 05 Oct 2017 04:00:00 GMT</pubDate></item><item><title>CG Homework 4, due Thu 2017-10-05 2359</title><link>https://wrf.ecse.rpi.edu/Teaching/graphics-f2017/posts/homework4/</link><dc:creator>W Randolph Franklin, RPI</dc:creator><description>&lt;div&gt;&lt;p&gt;(No programming this week).&lt;/p&gt;
&lt;ol class="arabic"&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(2 pts)&lt;/em&gt; Put the following in the correct order for the graphics pipeline.&lt;/p&gt;
&lt;p&gt;fragment-shader primitive-assembly  rasterizer vertex-shader&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(2)&lt;/em&gt; If you wanted to read some user input and then change all the vertex positions by multiplying each x-coordinate by some amount, the most efficient (in machine time) place to do it  (pick one):&lt;/p&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;with a javascript function&lt;/li&gt;
&lt;li&gt;in the vertex shader&lt;/li&gt;
&lt;li&gt;in the fragment shader&lt;/li&gt;
&lt;li&gt;in the html file&lt;/li&gt;
&lt;li&gt;it can't be done.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(2)&lt;/em&gt; Why does OpenGL have the triangle-strip object type, in addition to the triangle type?&lt;/p&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;It leads to smaller, faster, graphics objects.&lt;/li&gt;
&lt;li&gt;It leads to bigger, faster, graphics objects.&lt;/li&gt;
&lt;li&gt;It's not possible to split some complicated polygons into lots of simple triangles, but you  can split them into triangle-strips.&lt;/li&gt;
&lt;li&gt;The standards writers were being paid by the word.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(2)&lt;/em&gt; Standards &lt;em&gt;(select all that are true)&lt;/em&gt;&lt;/p&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;allow programmers to move between projects&lt;/li&gt;
&lt;li&gt;allow different types of hardward to be substituted in.&lt;/li&gt;
&lt;li&gt;.....             operating systems ......&lt;/li&gt;
&lt;li&gt;allow vendors to lock in customers.&lt;/li&gt;
&lt;li&gt;can prevent the latest HW from being used to its fullest.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(2)&lt;/em&gt; What is the physical principle underlying LCD?&lt;/p&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;Fire an energetic electron at a rare earth atom and a photon of light is emitted.&lt;/li&gt;
&lt;li&gt;A solution of corkscrew shaped molecules can rotate polarized light.&lt;/li&gt;
&lt;li&gt;Putting your finger close to a capacitor can change its capacitance.&lt;/li&gt;
&lt;li&gt;If two coils of wire are close, then an alternating current in one can induce a current in the other.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(2)&lt;/em&gt; What is the physical principle underlying the CRT?&lt;/p&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;Fire an energetic electron at a rare earth atom and a photon of light is emitted.&lt;/li&gt;
&lt;li&gt;A solution of corkscrew shaped molecules can rotate polarized light.&lt;/li&gt;
&lt;li&gt;Putting your finger close to a capacitor can change its capacitance.&lt;/li&gt;
&lt;li&gt;If two coils of wire are close, then an alternating current in one can induce a current in the other.&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 Philo T Farnsworth's chores as a kid gave him an idea for electronic television?&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(2)&lt;/em&gt; Color printing on a sheet of paper exemplifies&lt;/p&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;additive color&lt;/li&gt;
&lt;li&gt;subtractive color&lt;/li&gt;
&lt;li&gt;multiplicative color&lt;/li&gt;
&lt;li&gt;divisive color&lt;/li&gt;
&lt;li&gt;exponential color&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(4)&lt;/em&gt; Major components of the OpenGl model as discussed in class are:&lt;/p&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;Objects, viewer, light sources, planets, material attributes.&lt;/li&gt;
&lt;li&gt;Still cameras, video cameras, objects, light sources.&lt;/li&gt;
&lt;li&gt;Objects, viewer, light sources, material attributes.&lt;/li&gt;
&lt;li&gt;Colored objects, black and white objects, white lights, colored lights&lt;/li&gt;
&lt;li&gt;Flat objects, curved objects, near lights, distant lights.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(2)&lt;/em&gt; How do you draw a pentagon in WebGL?&lt;/p&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;Split it into triangles.&lt;/li&gt;
&lt;li&gt;Split it into triangles if it is concave, otherwise draw it directly.&lt;/li&gt;
&lt;li&gt;Split it into triangles if it is convex, otherwise draw it directly.&lt;/li&gt;
&lt;li&gt;Draw it directly.&lt;/li&gt;
&lt;li&gt;Split it into hexagons.&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 you want your javascript program to send a color for each vertex to the vertex shader, what type of variable would the color be?&lt;/p&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;uniform&lt;/li&gt;
&lt;li&gt;varying&lt;/li&gt;
&lt;li&gt;attribute&lt;/li&gt;
&lt;li&gt;dynamic&lt;/li&gt;
&lt;li&gt;static&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 carpet is an example of&lt;/p&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;diffuse reflection&lt;/li&gt;
&lt;li&gt;specular reflection&lt;/li&gt;
&lt;li&gt;environment mapping&lt;/li&gt;
&lt;li&gt;bump mapping&lt;/li&gt;
&lt;li&gt;how RPI saves money&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="arabic 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; If you do not tell WebGL to do hidden surface removal, and two
objects overlap the same pixel, then what color is that pixel?&lt;/p&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;WebGL throws an error.&lt;/li&gt;
&lt;li&gt;the closer object&lt;/li&gt;
&lt;li&gt;the farther object&lt;/li&gt;
&lt;li&gt;the first object to be drawn there&lt;/li&gt;
&lt;li&gt;the last object to be drawn there&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(2)&lt;/em&gt; &lt;strong&gt;gasket2&lt;/strong&gt; has this code:   &lt;strong&gt;var points=[ ]; ... points.push(a,b,c);&lt;/strong&gt;
What does &lt;strong&gt;push&lt;/strong&gt; do here?&lt;/p&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;Appends new entries to the end of points.&lt;/li&gt;
&lt;li&gt;Inserts new entries at the start of points.&lt;/li&gt;
&lt;li&gt;Overwrites the first entries of points.&lt;/li&gt;
&lt;li&gt;Overwrites the last entries of points.&lt;/li&gt;
&lt;li&gt;Throws an error because we didn't specify a size for points.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(2)&lt;/em&gt; Look at this &lt;a class="reference external" href="http://upload.wikimedia.org/wikipedia/commons/3/3b/CIE1931xy_blank.svg"&gt;CIE chromaticity diagram&lt;/a&gt;.  If you wanted to make white by mixing one spectrally pure color with the pure color with wavelength 600 nm, what wavelength would that other color be?&lt;/p&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;400&lt;/li&gt;
&lt;li&gt;485&lt;/li&gt;
&lt;li&gt;535&lt;/li&gt;
&lt;li&gt;580&lt;/li&gt;
&lt;li&gt;It's not possible, because purple is not a spectrally pure color.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(2)&lt;/em&gt; Sometimes you want to send a variable to a vertex shader that has the same value for every vertex.  Pick the following item for which this would be useful.&lt;/p&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;the vertex's coordinates&lt;/li&gt;
&lt;li&gt;the vertex's color&lt;/li&gt;
&lt;li&gt;the object's global orientation&lt;/li&gt;
&lt;li&gt;the location of the global light source&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(2)&lt;/em&gt; You call &lt;strong&gt;gl.BufferSubData&lt;/strong&gt; to do what?&lt;/p&gt;
&lt;ol class="arabic 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;/ol&gt;
&lt;p&gt;&lt;em&gt;(Total: 38 points.)&lt;/em&gt;&lt;/p&gt;&lt;/div&gt;</description><category>homework</category><guid>https://wrf.ecse.rpi.edu/Teaching/graphics-f2017/posts/homework4/</guid><pubDate>Mon, 25 Sep 2017 04:00:00 GMT</pubDate></item><item><title>CG Homework 3, due Thu 2017-09-28 2359</title><link>https://wrf.ecse.rpi.edu/Teaching/graphics-f2017/posts/homework3/</link><dc:creator>W Randolph Franklin, RPI</dc:creator><description>&lt;div&gt;&lt;p&gt;&lt;strong&gt;Due date postponed because of inconsistencies in due dates.&lt;/strong&gt;&lt;/p&gt;
&lt;ol class="arabic"&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(10 pts)&lt;/em&gt;    Part of changing from one coordinate system to another is scaling and making things fit. E.g., suppose that you had a square with lower left corner (llc) (0,0) and upper right corner (urc) (1,1). You want to scale and center it to just fit into a rectangle with llc (0,0) and urc (2,3). The square stays a square but is probably larger or smaller. Then, these equations would do it:&lt;/p&gt;
&lt;div class="line-block"&gt;
&lt;div class="line"&gt;x' = 2x&lt;/div&gt;
&lt;div class="line"&gt;y' = 2y + 1/2&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This question is to figure out how to make a rectangle from (0,0) to (2,3) fit into a square that is from (0,0) to (12,12).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(10 pts)&lt;/em&gt; Consider a pinhole camera as discussed in slide 12 of ppt
presentation 1_5.  Let d=2.  To where does the point (1,3,-3)
project?  Use the equation on that slide.  x/z/d should be
parenthesized as x/(z/d).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(5)&lt;/em&gt;   If your image has only 64 different colors across the whole image, how many bits per pixel do you need for the color buffer?&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(25)&lt;/em&gt; Extend your program from last week that displays the Starship Enterprise as follows:&lt;/p&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;Add 3 sliders that will rotate it around the X-axis, Y-axis, and Z-axis respectively.&lt;/li&gt;
&lt;li&gt;Do the rotations the simplest (and least efficient) way.  I.e., in your javascript program, have render rotate the matrix and resend it to the GPU.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;em&gt;(Total: 50 points.)&lt;/em&gt;&lt;/p&gt;&lt;/div&gt;</description><category>homework</category><guid>https://wrf.ecse.rpi.edu/Teaching/graphics-f2017/posts/homework3/</guid><pubDate>Mon, 18 Sep 2017 04:00:00 GMT</pubDate></item><item><title>CG Homework 2, due Mon 2017-09-18</title><link>https://wrf.ecse.rpi.edu/Teaching/graphics-f2017/posts/homework2/</link><dc:creator>W Randolph Franklin, RPI</dc:creator><description>&lt;div&gt;&lt;div class="section" id="rules"&gt;
&lt;h2&gt;Rules&lt;/h2&gt;
&lt;ol class="arabic"&gt;
&lt;li&gt;&lt;p class="first"&gt;You may work in teams of 2.  Each team should submit their solution under only 1 student's name, but mention both people at the top of the submission.  The other student's submission should just name the lead student.  (This makes it easier for us to track things and to avoid grading it twice.)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Hand in your solution on RPILMS.   As for formats, we'll take (at least) a scanned image of a neatly handwritten page, raw text, PDF, and MS Word.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;For the programming question, pick whichever you prefer to get us the code:&lt;/p&gt;
&lt;ol class="arabic"&gt;
&lt;li&gt;&lt;p class="first"&gt;Submit a zipped file, containing your .js and .html files and the utility files needed to run it.  It must be organized so that if we unzip into a random location and point the browser at the .html file, then it will work.&lt;/p&gt;
&lt;p&gt;It might be easier to move the utility .js files into the same directory as your code (and adjust the &lt;em&gt;include&lt;/em&gt; lines).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Put the code on a web server such as RCS.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div class="section" id="questions"&gt;
&lt;h2&gt;Questions&lt;/h2&gt;
&lt;ol class="arabic"&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(5 pts)&lt;/em&gt; Which RPI grad was the technical person in the
founding group of NVidia?&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(5 pts)&lt;/em&gt; What hardware component had to get much cheaper in
order to make frame buffers possible?&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(5 pts)&lt;/em&gt; The progress of computer graphics has always been
enabled by new hardware.  One newish toy is Google Cardboard.
Pretend that I've never heard of it, and write 100 words or so
summarizing it and giving specific details.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(20)&lt;/em&gt; Modify last week's program to display the spaceship
NCC1701.&lt;/p&gt;
&lt;ol class="arabic"&gt;
&lt;li&gt;&lt;p class="first"&gt;The data is in the file &lt;a class="reference external" href="https://wrf.ecse.rpi.edu/Teaching/graphics-f2017/files/ncc1701b.data"&gt;ncc1701b.data&lt;/a&gt; .  Each
line gives the vertices of one triangle as follows:&lt;/p&gt;
&lt;p&gt;x1 y1 z1 x2 y2 z2 x3 y3 z3&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Insert the data into your javascript file and try displaying it.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;If this is too much data, then reduce the number of triangles
until something displays.  Report what went wrong, and how
many triangles could be displayed.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;You might have to scale the data to fit.  I'll let you figure
out the easiest way to do that.  The problem is that last
week's square had coordinates in the range from -1 to 1,
while the NCC1701 does not.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Attach a PDF of any files you modified and a screendump.  If
the file has a multi-thousand line array, it's ok to delete
the middle.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(5)&lt;/em&gt; In real life, light bounces from object to object, on
its way from the light source to the viewer.  However, the
OpenGL pipeline processes objects independently, and does not
allow that (except the an object can hide another object).
Why?&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(10)&lt;/em&gt; According to the tristimulus model, our eyes have
three types of color receptors (cones).  However several
species and some rare human females have four types of cones.
They are called tetrachromats.&lt;/p&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;Name some such animals.&lt;/li&gt;
&lt;li&gt;For humans, why is it (probably; opinions differ) only
females?&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;em&gt;(Total: 50 points.)&lt;/em&gt;&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;</description><category>homework</category><guid>https://wrf.ecse.rpi.edu/Teaching/graphics-f2017/posts/homework2/</guid><pubDate>Mon, 11 Sep 2017 04:00:00 GMT</pubDate></item><item><title>CG Homework 1, due Mon 2017-09-11, 9am</title><link>https://wrf.ecse.rpi.edu/Teaching/graphics-f2017/posts/homework1/</link><dc:creator>W Randolph Franklin, RPI</dc:creator><description>&lt;div&gt;&lt;p&gt;Hand in your solution on RPILMS.  You may work in teams of 2.  Each team should submit their solution under only 1 student's name, but mention both people at the top of the submission.  The other student's submission should just name the lead student.  (This makes it easier for us to track things and to avoid grading it twice.)  As for formats, we'll take (at least) a scanned image of a neatly handwritten page, raw text, PDF, and MS Word.&lt;/p&gt;
&lt;ol class="arabic"&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(4 pts)&lt;/em&gt; One graphics pioneer was Ivan Sutherland.  Name an
influential tool that he created and an influential algorithm
that he helped create.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(4)&lt;/em&gt; Consider these 3-D vectors: A=(0,4,2), B=(5,2,3),
C=(8,7,9).  Compute:&lt;/p&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;A.(BxC)&lt;/li&gt;
&lt;li&gt;(AxB).C&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(4)&lt;/em&gt; &lt;em&gt;(This is another a test of your linear algebra
knowledge.  Feel free to refer to books to find the  correct
formulae.)&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Suppose that we have a plane in 3-D thru the points A(4,2,0),
B(2,2,0), and C(0,1,1).&lt;/p&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;What is its equation, in the form &lt;em&gt;ax+by+cz+d=0&lt;/em&gt; ?&lt;/li&gt;
&lt;li&gt;Consider the line L thru the points O(0,0,0) and P(1,1,1).
Where does this line intersect the plane?&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(4)&lt;/em&gt; Modify the program in &lt;a class="reference external" href="http://www.cs.unm.edu/~angel/WebGL/7E/CLASS/square.html"&gt;http://www.cs.unm.edu/~angel/WebGL/7E/CLASS/square.html&lt;/a&gt; ,
which calls several other files, to display shapes that are the
first initials of the last names of the team members.&lt;/p&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;Assume that your RCSID is &lt;strong&gt;STUDENT&lt;/strong&gt;.   In the following, replace STUDENT with your RCSID.&lt;/li&gt;
&lt;li&gt;From an RPI windows machine, click the AFS RPI icon create a share with your RCS files.&lt;/li&gt;
&lt;li&gt;Go into &lt;em&gt;public_html&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;Create a folder called &lt;em&gt;homeworks&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;Copy the folder
&lt;a class="reference external" href="https://wrf.ecse.rpi.edu/Teaching/graphics-f2016/SEVENTH_EDITION/CODE/Common/"&gt;https://wrf.ecse.rpi.edu/Teaching/graphics-f2016/SEVENTH_EDITION/CODE/Common/&lt;/a&gt;
into homeworks.&lt;/li&gt;
&lt;li&gt;Create a subfolder &lt;em&gt;homework1&lt;/em&gt; under homeworks.&lt;/li&gt;
&lt;li&gt;Copy files &lt;a class="reference external" href="https://wrf.ecse.rpi.edu/Teaching/graphics-f2016/SEVENTH_EDITION/CODE/CLASS/square.html"&gt;https://wrf.ecse.rpi.edu/Teaching/graphics-f2016/SEVENTH_EDITION/CODE/CLASS/square.html&lt;/a&gt; and &lt;a class="reference external" href="https://wrf.ecse.rpi.edu/Teaching/graphics-f2016/SEVENTH_EDITION/CODE/CLASS/square.js"&gt;https://wrf.ecse.rpi.edu/Teaching/graphics-f2016/SEVENTH_EDITION/CODE/CLASS/square.js&lt;/a&gt; into that folder.&lt;/li&gt;
&lt;li&gt;Change them to answer the homework.&lt;/li&gt;
&lt;li&gt;Look at your answer by browsing to &lt;a class="reference external" href="https://www.rpi.edu/~STUDENT/homeworks/homework1/square.html"&gt;https://www.rpi.edu/~STUDENT/homeworks/homework1/square.html&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;When you've solved that question:&lt;/p&gt;
&lt;ol class="arabic"&gt;
&lt;li&gt;&lt;p class="first"&gt;Put your answers to all the homework questions in some file, even on your own PC.&lt;/p&gt;
&lt;p&gt;Include listing for the files you changed for square.&lt;/p&gt;
&lt;p&gt;Mention the URL to access your modified square, e.g.,   &lt;a class="reference external" href="https://www.rpi.edu/~STUDENT/homeworks/homework1/square.html"&gt;https://www.rpi.edu/~STUDENT/homeworks/homework1/square.html&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Upload that file of answers to LMS.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The  TAs will be glad to help with any problems.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(2)&lt;/em&gt; Do exercise 1.1 from the textbook, page 37.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;em&gt;(2)&lt;/em&gt; Do exercise 1.8 from the textbook, page 38.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;em&gt;(Total: 20 points.)&lt;/em&gt;&lt;/p&gt;&lt;/div&gt;</description><category>homework</category><guid>https://wrf.ecse.rpi.edu/Teaching/graphics-f2017/posts/homework1/</guid><pubDate>Thu, 31 Aug 2017 04:00:00 GMT</pubDate></item></channel></rss>