(*********************************************************************** Mathematica-Compatible Notebook This notebook can be used on any computer system with Mathematica 4.0, MathReader 4.0, or any compatible application. The data for the notebook starts with the line containing stars above. To get the notebook into a Mathematica-compatible application, do one of the following: * Save the data starting with the line of stars above into a file with a name ending in .nb, then open the file inside the application; * Copy the data starting with the line of stars above to the clipboard, then use the Paste menu command inside the application. Data for notebooks contains only printable 7-bit ASCII and can be sent directly in email or through ftp in text mode. Newlines can be CR, LF or CRLF (Unix, Macintosh or MS-DOS style). NOTE: If you modify the data for this notebook not in a Mathematica- compatible application, you must delete the line below containing the word CacheID, otherwise Mathematica-compatible applications may try to use invalid cache data. For more information on notebooks and Mathematica-compatible applications, contact Wolfram Research: web: http://www.wolfram.com email: info@wolfram.com phone: +1-217-398-0700 (U.S.) Notebook reader applications are available free of charge from Wolfram Research. ***********************************************************************) (*CacheID: 232*) (*NotebookFileLineBreakTest NotebookFileLineBreakTest*) (*NotebookOptionsPosition[ 23700, 749]*) (*NotebookOutlinePosition[ 24408, 774]*) (* CellTagsIndexPosition[ 24364, 770]*) (*WindowFrame->Normal*) Notebook[{ Cell[CellGroupData[{ Cell["Computer Graphics", "Title", CellFrame->True, TextAlignment->Center, Background->RGBColor[0, 1, 0]], Cell["\<\ This notebook is by Steven Amgott. Please send any questions or \ comments to samgott1@swarthmore.edu. Feel free to use and distribute this \ notebook, but keep this author information in any copy you use or distribute.\ \ \>", "SmallText"], Cell[CellGroupData[{ Cell[TextData[{ "Eliminating some unnecessary warning messages. ", StyleBox["(Should be skipped)", FontColor->RGBColor[1, 0, 1]] }], "Subsubsection"], Cell[BoxData[{ \(\(Off[General::"\"];\)\), "\n", \(\(Off[General::"\"];\)\)}], "Input", InitializationCell->True] }, Closed]], Cell[CellGroupData[{ Cell["The letter N.", "Section"], Cell[TextData[{ "The letter N can be stored in a computer as a matrix of data points. The \ points form the columns of the matrix. Each point is connected by a line \ segment to the point in the next column. I have added a column at the end \ which is the same as the first column so that ", StyleBox["Mathematica", FontSlant->"Italic"], " will connect the last point to the first point." }], "Text"], Cell[BoxData[{\(Clear[n]\), "\n", RowBox[{ RowBox[{"n", "=", RowBox[{"(", GridBox[{ {"0", ".5", ".5", "6", "6", "5.5", "5.5", "0", "0"}, {"0", "0", "6.42", "0", "8", "8", "1.58", "8", "0"} }], ")"}]}], ";"}]}], "Input", InitializationCell->True], Cell["Here is a plot of the points.", "Text"], Cell[BoxData[{ \(Clear[ptplot]\), \(\(ptplot = ListPlot[Transpose[n], Axes -> False, \n\tAspectRatio -> 1, PlotStyle -> PointSize[ .02]]; \)\)}], "Input"], Cell["If we want to see the N, we need to connect the dots.", "Text"], Cell[BoxData[{ \(Clear[nplot]\), \(\(nplot = ListPlot[Transpose[n], \n\tAspectRatio -> 1, PlotJoined -> True]; \)\)}], "Input"], Cell["Here are the plots together.", "Text"], Cell[BoxData[ \(\(Show[ptplot, nplot]; \)\)], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["Scaling", "Section"], Cell["\<\ We can scale a vector (or several vectors) by different amounts in \ the x and y directions using a matrix with 0 off the diagonal. To scale \ horizontally by a factor of a and vertically by a factor of b, we multiply by \ the matrix\ \>", "Text"], Cell[BoxData[{\(Clear[a, b, scale]\), "\n", RowBox[{ RowBox[{\(scale[a_, b_]\), ":=", RowBox[{"(", GridBox[{ {"a", "0"}, {"0", "b"} }], ")"}]}], ";"}]}], "Input", InitializationCell->True], Cell["\<\ The next cell shows the effect of multiplying on the left by this \ matrix.\ \>", "Text"], Cell[BoxData[{\(Clear[a, b, x, y]\), "\n", RowBox[{"MatrixForm", "[", RowBox[{\(scale[a, b]\), ".", RowBox[{"(", GridBox[{ {"x"}, {"y"} }], ")"}]}], "]"}]}], "Input"], Cell[TextData[{ "Here we shrink our N horizontally by a factor of .75 and stretch it \ vertically by a factor of 1.5. We'll make the transformed letter ", StyleBox["blue", FontColor->RGBColor[0, 0, 1]], "." }], "Text"], Cell[BoxData[ \(\(ListPlot[Transpose[scale[ .75, 1.5] . n], AspectRatio -> 1, PlotJoined -> True, PlotStyle \[Rule] RGBColor[0, 0, 1]];\)\)], "Input"], Cell["We can overlay the new plot on the old plot.", "Text"], Cell[BoxData[ \(\(Show[nplot, %]; \)\)], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["Rotations", "Section"], Cell[TextData[{ "We can rotate a vector counterclockwise by an angle \[Theta] by using the \ matrix ", Cell[BoxData[ RowBox[{"(", GridBox[{ {\(Cos[\[Theta]]\), \(-Sin[\[Theta]]\)}, {\(Sin[\[Theta]]\), \(Cos[\[Theta]]\)} }], ")"}]]], ". " }], "Text"], Cell[BoxData[{\(Clear[rotate, \[Theta]]\), "\n", RowBox[{\(rotate[\[Theta]_]\), ":=", RowBox[{"(", GridBox[{ {\(Cos[\[Theta]]\), \(-Sin[\[Theta]]\)}, {\(Sin[\[Theta]]\), \(Cos[\[Theta]]\)} }], ")"}]}]}], "Input", InitializationCell->True], Cell[TextData[{ " For instance, to rotate by an angle ", Cell[BoxData[ \(TraditionalForm\`\[Pi]\/4\)]], ", we use" }], "Text"], Cell[BoxData[ \(MatrixForm[rotate[\[Pi]\/4]]\)], "Input"], Cell[TextData[{ "Here's a plot of the rotated letter N, colored ", StyleBox["blue", FontColor->RGBColor[0, 0, 1]], "." }], "Text"], Cell[BoxData[ \(\(ListPlot[Transpose[rotate[\[Pi]\/4] . n], AspectRatio -> 1, PlotJoined -> True, PlotStyle \[Rule] RGBColor[0, 0, 1]]; \)\)], "Input"], Cell["Once again, an overlay of the two plots.", "Text"], Cell[BoxData[ \(\(Show[nplot, %]; \)\)], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["Reflections", "Section"], Cell["\<\ We can reflect through various axes and the origin. For instance, \ to reflect horizontally, we can use the matrix\ \>", "Text"], Cell[BoxData[{\(Clear[hreflect]\), "\n", RowBox[{ RowBox[{"hreflect", "=", RowBox[{"(", GridBox[{ {\(-1\), "0"}, {"0", "1"} }], ")"}]}], ";"}]}], "Input", InitializationCell->True], Cell["Here's the horizontal reflection of the vector {x,y}.", "Text"], Cell[BoxData[{\(Clear[x, y]\), "\n", RowBox[{"MatrixForm", "[", RowBox[{"hreflect", ".", RowBox[{"(", GridBox[{ {"x"}, {"y"} }], ")"}]}], "]"}]}], "Input"], Cell["Here's our letter N, reflected horizontally.", "Text"], Cell[BoxData[ \(\(ListPlot[Transpose[hreflect . n], \n\tAspectRatio -> 1, PlotJoined -> True, PlotStyle \[Rule] RGBColor[0, 0, 1]]; \)\)], "Input"], Cell["The combined graphs.", "Text"], Cell[BoxData[ \(\(Show[nplot, %]; \)\)], "Input"], Cell["\<\ Vertical reflection and reflection through the origin are performed \ by the matrices\ \>", "Text"], Cell[BoxData[{\(Clear[vreflect, oreflect]\), "\n", RowBox[{ RowBox[{"vreflect", "=", RowBox[{"(", GridBox[{ {"1", "0"}, {"0", \(-1\)} }], ")"}]}], ";", "\n", RowBox[{"oreflect", "=", RowBox[{"(", GridBox[{ {\(-1\), "0"}, {"0", \(-1\)} }], ")"}]}], ";"}]}], "Input", InitializationCell->True], Cell["Here we apply them to the vector {x,y}.", "Text"], Cell[BoxData[{\(Clear[x, y]\), "\n", RowBox[{"MatrixForm", "[", RowBox[{"vreflect", ".", RowBox[{"(", GridBox[{ {"x"}, {"y"} }], ")"}]}], "]"}], "\n", RowBox[{"MatrixForm", "[", RowBox[{"oreflect", ".", RowBox[{"(", GridBox[{ {"x"}, {"y"} }], ")"}]}], "]"}]}], "Input"], Cell["Let's try them on our N. First the vertical reflection", "Text"], Cell[BoxData[ \(\(ListPlot[Transpose[vreflect . n], \n\tAspectRatio -> 1, PlotJoined -> True, PlotStyle \[Rule] RGBColor[0, 0, 1]]; \)\)], "Input"], Cell["then together with our original N.", "Text"], Cell[BoxData[ \(\(Show[nplot, %]; \)\)], "Input"], Cell["Now the reflection through the origin", "Text"], Cell[BoxData[ \(\(ListPlot[Transpose[oreflect . n], \n\tAspectRatio -> 1, PlotJoined -> True, PlotStyle \[Rule] RGBColor[0, 0, 1]]; \)\)], "Input"], Cell["together with our original N.", "Text"], Cell[BoxData[ \(\(Show[nplot, %]; \)\)], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["Shears", "Section"], Cell["\<\ We can \"italicize\" the letter by using a shear transformation. \ \ \>", "Text"], Cell[BoxData[{\(Clear[shear, a]\), "\n", RowBox[{\(shear[a_]\), ":=", RowBox[{"(", GridBox[{ {"1", "a"}, {"0", "1"} }], ")"}]}]}], "Input", InitializationCell->True], Cell["\<\ We can see what multiplying on the left by this does using the \ next cell.\ \>", "Text"], Cell[BoxData[{\(Clear[a, x, y]\), "\n", RowBox[{"MatrixForm", "[", RowBox[{\(shear[a]\), ".", RowBox[{"(", GridBox[{ {"x"}, {"y"} }], ")"}]}], "]"}]}], "Input"], Cell["Here we apply a shear with a = .25 to our N.", "Text"], Cell[BoxData[ \(\(ListPlot[Transpose[shear[ .25] . n], \n\tAspectRatio -> 1, PlotJoined -> True, PlotStyle \[Rule] RGBColor[0, 0, 1]]; \)\)], "Input"], Cell["and then show it with the original N.", "Text"], Cell[BoxData[ \(\(Show[nplot, %]; \)\)], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["Translations", "Section"], Cell["\<\ Unfortunately, translation is not a linear transformation, and so \ is not represented by a matrix directly. We can get around this problem by \ going to \"homogeneous coordinates.\" We add a third coordinate (a 1) to \ each vector, and use three by three matrices instead of two by two. The \ third column of the matrix performs the translation. To move a vector right \ a units and up b units, we can use the translation matrix \ \>", "Text"], Cell[BoxData[{\(Clear[translate, a, b]\), "\n", RowBox[{ RowBox[{\(translate[a_, b_]\), ":=", RowBox[{"(", GridBox[{ {"1", "0", "a"}, {"0", "1", "b"}, {"0", "0", "1"} }], ")"}]}], ";"}]}], "Input", InitializationCell->True], Cell["We can see the effect in the next cell.", "Text"], Cell[BoxData[{\(Clear[a, b, x, y]\), "\n", RowBox[{"MatrixForm", "[", RowBox[{\(translate[a, b]\), ".", RowBox[{"(", GridBox[{ {"x"}, {"y"}, {"1"} }], ")"}]}], "]"}], "\n", RowBox[{"MatrixForm", "[", RowBox[{"Drop", "[", RowBox[{ RowBox[{\(translate[a, b]\), ".", RowBox[{"(", GridBox[{ {"x"}, {"y"}, {"1"} }], ")"}]}], ",", \(-1\)}], "]"}], "]"}]}], "Input"], Cell[TextData[{ "Remember, we needed to add a 1 as a third coordinate to our starting \ vector, apply the transformation, and then drop the last coordinate of the \ resulting vector (which is why the ", StyleBox["Drop", FontColor->RGBColor[1, 0, 0]], " command is included in the syntax on the second line). To work on our \ letter, we need to add the third coordinates to each vector. After doing the \ translation (by matrix multiplication) we will need to drop this coordinate \ before plotting. Here is our letter N in homogeneous coordinates." }], "Text"], Cell[BoxData[{\(Clear[nhom]\), "\n", RowBox[{ RowBox[{"nhom", "=", RowBox[{"(", GridBox[{ {"0", ".5", ".5", "6", "6", "5.5", "5.5", "0", "0"}, {"0", "0", "6.42", "0", "8", "8", "1.58", "8", "0"}, {"1", "1", "1", "1", "1", "1", "1", "1", "1"} }], ")"}]}], ";"}]}], "Input", InitializationCell->True], Cell["We translate 1 unit to the right and two units up.", "Text"], Cell[BoxData[ \(MatrixForm[translate[1, 2] . nhom]\)], "Input"], Cell["We need to drop the third coordinates before plotting.", "Text"], Cell[BoxData[ \(MatrixForm[Drop[translate[1, 2] . nhom, \(-1\)]]\)], "Input"], Cell["Here's the final picture", "Text"], Cell[BoxData[ \(\(ListPlot[Transpose[Drop[translate[1, 2] . nhom, \(-1\)]], AxesOrigin -> {0, 0}, \n\tAspectRatio -> 1, PlotJoined -> True, PlotStyle \[Rule] RGBColor[0, 0, 1]]; \)\)], "Input"], Cell["and here we superimpose on the original plot.", "Text"], Cell[BoxData[ \(\(Show[nplot, %]; \)\)], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["Converting to homogeneous coordinates", "Section"], Cell["\<\ We can adjust all the matrices above to work in homogeneous \ coordinates by imbedding them as the \"upper corner\" of a three by three \ matrix, with a 1 in the (3,3) position and 0 elsewhere. For instance, the \ shear matrix from above becomes\ \>", "Text"], Cell[BoxData[{\(Clear[shearhom, a]\), "\n", RowBox[{ RowBox[{\(shearhom[a_]\), "=", RowBox[{"(", GridBox[{ {"1", "a", "0"}, {"0", "1", "0"}, {"0", "0", "1"} }], ")"}]}], ";"}]}], "Input", InitializationCell->True], Cell[BoxData[{ RowBox[{"MatrixForm", "[", RowBox[{\(shearhom[a]\), ".", RowBox[{"(", GridBox[{ {"x"}, {"y"}, {"1"} }], ")"}]}], "]"}], "\n", RowBox[{"MatrixForm", "[", RowBox[{"Drop", "[", RowBox[{ RowBox[{\(shearhom[a]\), ".", RowBox[{"(", GridBox[{ {"x"}, {"y"}, {"1"} }], ")"}]}], ",", \(-1\)}], "]"}], "]"}]}], "Input"], Cell["\<\ The cells below will \"italicize\" N as before, but using \ homogeneous coordinates this time. We apply the transformation\ \>", "Text"], Cell[BoxData[ \(MatrixForm[shearhom[ .25] . nhom]\)], "Input"], Cell["drop the third coordinates", "Text"], Cell[BoxData[ \(MatrixForm[Drop[shearhom[ .25] . nhom, \(-1\)]]\)], "Input"], Cell["and plot.", "Text"], Cell[BoxData[ \(\(ListPlot[Transpose[Drop[shearhom[ .25] . nhom, \(-1\)]], \n\t AspectRatio -> 1, PlotJoined -> True, PlotStyle \[Rule] RGBColor[0, 0, 1]]; \)\)], "Input"], Cell["We can then overlay the plot on our original N.", "Text"], Cell[BoxData[ \(\(Show[nplot, %]; \)\)], "Input"], Cell["\<\ Here are the other operations, converted to homogeneous \ coordinates.\ \>", "Text"], Cell[BoxData[{\(Clear[a, b, \[Theta], scalehom, rotatehom, hreflecthom, vreflecthom, oreflecthom]\), "\n", RowBox[{ RowBox[{\(scalehom[a_, b_]\), ":=", RowBox[{"(", GridBox[{ {"a", "0", "0"}, {"0", "b", "0"}, {"0", "0", "1"} }], ")"}]}], ";", "\n", \(Clear[rotatehom, \[Theta]]\)}], "\n", RowBox[{\(rotatehom[\[Theta]_]\), ":=", RowBox[{"(", GridBox[{ {\(Cos[\[Theta]]\), \(-Sin[\[Theta]]\), "0"}, {\(Sin[\[Theta]]\), \(Cos[\[Theta]]\), "0"}, {"0", "0", "1"} }], ")"}]}], "\n", RowBox[{ RowBox[{"hreflecthom", "=", RowBox[{"(", GridBox[{ {\(-1\), "0", "0"}, {"0", "1", "0"}, {"0", "0", "1"} }], ")"}]}], ";", "\n", RowBox[{"vreflecthom", "=", RowBox[{"(", GridBox[{ {"1", "0", "0"}, {"0", \(-1\), "0"}, {"0", "0", "1"} }], ")"}]}], ";", "\n", RowBox[{"oreflecthom", "=", RowBox[{"(", GridBox[{ {\(-1\), "0", "0"}, {"0", \(-1\), "0"}, {"0", "0", "1"} }], ")"}]}], ";"}]}], "Input", InitializationCell->True] }, Closed]], Cell[CellGroupData[{ Cell["Combining transformations", "Section"], Cell["\<\ Once we have redone everything in homogeneous coordinates, we can \ combine the transformations by matrix multiplication. For instance, we can \ first shear the letter N to italicize it, scale it horizontally by .5, and \ then translate it one unit right and two units up by multiplying the matrices \ translate[1,2], scalehom[.75,1], and shearhom[.25]\ \>", "Text"], Cell[BoxData[ \(MatrixForm[translate[1, 2] . scalehom[ .5, 1] . shearhom[ .25] . nhom] \)], "Input"], Cell["We need to drop the third coordinates", "Text"], Cell[BoxData[ \(MatrixForm[ Drop[translate[1, 2] . scalehom[ .5, 1] . shearhom[ .25] . nhom, \(-1\)]]\)], "Input"], Cell["before plotting", "Text"], Cell[BoxData[ \(\(ListPlot[ Transpose[ Drop[translate[1, 2] . scalehom[ .5, 1] . shearhom[ .25] . nhom, \(-1\)]], AxesOrigin -> {0, 0}, \n\tAspectRatio -> 1, PlotJoined -> True, PlotStyle \[Rule] RGBColor[0, 0, 1]]; \)\)], "Input"], Cell["and superimposing the graphs.", "Text"], Cell[BoxData[ \(\(Show[nplot, %]; \)\)], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["Animated graphics", "Section"], Cell[CellGroupData[{ Cell["Spinning our N about its lower left corner.", "Subsection"], Cell["\<\ We can animate spinning N around the left corner of its base using \ rotation. Evaluate the next cell to produce the individual \"panels\" of the \ animation. Then select all the graphs using your mouse. Use the Animate \ Selected Graphics command from the Cell item on the menu to spin the letter. \ You can adjust the speed and direction of spin at the bottom of the notebook \ frame. You can also make the animation \"smoother\" by increasing the value \ of m, at the cost of more computer time to generate the graphs.\ \>", "Text"], Cell[BoxData[ RowBox[{ RowBox[{"m", "=", StyleBox["50", FontColor->RGBColor[1, 0, 1]]}], ";", "\n", \(Do[\nListPlot[ Transpose[Drop[rotatehom[\(2\ \[Pi]\)\/m\ k] . nhom, \(-1\)]], AspectRatio -> 1, Axes -> False, PlotRange -> {{\(-10\), 10}, {\(-10\), 10}}, PlotJoined -> True], { k, 0, m}]\)}]], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["Spinning our N about its center.", "Subsection"], Cell["\<\ We can animate a spinning N about its center by first translating \ the center to (0,0) (by 3 units to the left and 4 units down), and then doing \ the rotation. Evaluate the next cell to produce the individual \"panels\" of \ the animation. Then select all the graphs using your mouse. Use the Animate \ Selected Graphics command from the Cell item on the menu to spin the letter. \ You can adjust the speed and direction of spin at the bottom of the notebook \ frame. You can also make the animation \"smoother\" by increasing the value \ of m, at the cost of more computer time to generate the graphs.\ \>", "Text"], Cell[BoxData[ RowBox[{ RowBox[{"m", "=", StyleBox["50", FontColor->RGBColor[1, 0, 1]]}], ";", "\n", \(Do[\nListPlot[ Transpose[ Drop[rotatehom[\(2\ \[Pi]\)\/m\ k] . translate[\(-3\), \(-4\)] . nhom, \(-1\)]], AspectRatio -> 1, Axes -> False, PlotRange -> {{\(-10\), 10}, {\(-10\), 10}}, PlotJoined -> True], { k, 0, m}]\)}]], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["A marching N.", "Subsection"], Cell["\<\ We can animate translating our N. Evaluate the next cell to \ produce the individual \"panels\" of the animation. Then select all the \ graphs using your mouse. Use the Animate Selected Graphics command from the \ Cell item on the menu to bend the letter. You can adjust the speed and \ direction of the march at the bottom of the notebook frame. \ \>", "Text"], Cell[BoxData[ RowBox[{ RowBox[{"m", "=", StyleBox["50", FontColor->RGBColor[1, 0, 1]]}], ";", "\n", \(Do[\nListPlot[Transpose[Drop[translate[10\/m\ k, 0] . nhom, \(-1\)]], AspectRatio -> 1, Axes -> False, PlotRange -> {{0, 25}, {\(-10\), 10}}, PlotJoined -> True], {k, 0, m}]\)}]], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["Bending our N.", "Subsection"], Cell["\<\ We can animate bending our N using shear transformations. Evaluate \ the next cell to produce the individual \"panels\" of the animation. Then \ select all the graphs using your mouse. Use the Animate Selected Graphics \ command from the Cell item on the menu to bend the letter. You can adjust \ the speed and direction of bend at the bottom of the notebook frame. You can \ also make the animation \"smoother\" by increasing the value of m, at the \ cost of more computer time to generate the graphs.\ \>", "Text"], Cell[BoxData[ RowBox[{ RowBox[{"m", "=", StyleBox["50", FontColor->RGBColor[1, 0, 1]]}], ";", "\n", \(Do[\nListPlot[Transpose[Drop[shearhom[2\/m\ k] . nhom, \(-1\)]], AspectRatio -> 1, Axes -> False, PlotRange -> {{0, 25}, {\(-10\), 10}}, PlotJoined -> True], {k, 0, m}]\)}]], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["A combination.", "Subsection"], Cell["\<\ Evaluate the next cell to produce the individual \"panels\" of the \ animation. Then select all the graphs using your mouse. Use the Animate \ Selected Graphics command from the Cell item on the menu to bend the letter. \ You can adjust the speed and direction of bend at the bottom of the notebook \ frame. You can also make the animation \"smoother\" by increasing the value \ of m, at the cost of more computer time to generate the graphs. Take a look \ at the result, and see which of the transformations we are using.\ \>", "Text"], Cell[BoxData[ RowBox[{ RowBox[{"m", "=", StyleBox["50", FontColor->RGBColor[1, 0, 1]]}], ";", "\n", \(Do[\nListPlot[ Transpose[ Drop[rotatehom[\(2\ \[Pi]\)\/m\ k] . shearhom[1\/m\ k] . translate[15\/m\ k, 0] . nhom, \(-1\)]], AspectRatio -> 1, Axes -> False, PlotRange -> {{\(-25\), 40}, {\(-35\), 25}}, PlotJoined -> True], {k, 0, m}]\)}]], "Input"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["A final word: 3D graphics", "Section"], Cell["\<\ All of the above involved two dimensional graphics. The big \ emphasis at present is on 3D graphics (especially in computer games). To do \ 3D graphics, we need to work with homogeneous coordinates in 4 dimensions \ (with 1s as the fourth coordinate of all vectors). That part is quite \ similar to what we have done above. The major remaining thing to do is to \ project the resulting vectors onto a two dimensional surface from the \ perspective of an observer (so we can display the pictures on a computer \ monitor). The upshot of all this is that one of the principal functions of a \ 3D graphics card for a computer is to be a very fast 4 by 4 matrix \ multiplier.\ \>", "Text"] }, Closed]] }, Open ]] }, FrontEndVersion->"4.0 for Microsoft Windows", ScreenRectangle->{{0, 1024}, {0, 720}}, AutoGeneratedPackage->None, WindowToolbars->"EditBar", WindowSize->{705, 659}, WindowMargins->{{1, Automatic}, {Automatic, 0}} ] (*********************************************************************** Cached data follows. If you edit this Notebook file directly, not using Mathematica, you must remove the line containing CacheID at the top of the file. The cache data will then be recreated when you save this file from within Mathematica. ***********************************************************************) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[1739, 51, 111, 3, 131, "Title"], Cell[1853, 56, 252, 5, 44, "SmallText"], Cell[CellGroupData[{ Cell[2130, 65, 158, 4, 43, "Subsubsection"], Cell[2291, 71, 141, 3, 50, "Input", InitializationCell->True] }, Closed]], Cell[CellGroupData[{ Cell[2469, 79, 32, 0, 39, "Section"], Cell[2504, 81, 413, 8, 90, "Text"], Cell[2920, 91, 309, 7, 62, "Input", InitializationCell->True], Cell[3232, 100, 45, 0, 33, "Text"], Cell[3280, 102, 179, 4, 70, "Input"], Cell[3462, 108, 69, 0, 33, "Text"], Cell[3534, 110, 148, 4, 70, "Input"], Cell[3685, 116, 44, 0, 33, "Text"], Cell[3732, 118, 58, 1, 30, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[3827, 124, 26, 0, 39, "Section"], Cell[3856, 126, 258, 5, 52, "Text"], Cell[4117, 133, 252, 7, 62, "Input", InitializationCell->True], Cell[4372, 142, 99, 3, 33, "Text"], Cell[4474, 147, 229, 6, 62, "Input"], Cell[4706, 155, 229, 6, 52, "Text"], Cell[4938, 163, 172, 3, 50, "Input"], Cell[5113, 168, 60, 0, 33, "Text"], Cell[5176, 170, 53, 1, 30, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[5266, 176, 28, 0, 39, "Section"], Cell[5297, 178, 297, 9, 41, "Text"], Cell[5597, 189, 288, 6, 62, "Input", InitializationCell->True], Cell[5888, 197, 138, 5, 36, "Text"], Cell[6029, 204, 61, 1, 40, "Input"], Cell[6093, 207, 140, 5, 33, "Text"], Cell[6236, 214, 162, 2, 62, "Input"], Cell[6401, 218, 56, 0, 33, "Text"], Cell[6460, 220, 53, 1, 30, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[6550, 226, 30, 0, 39, "Section"], Cell[6583, 228, 139, 3, 33, "Text"], Cell[6725, 233, 244, 7, 62, "Input", InitializationCell->True], Cell[6972, 242, 69, 0, 33, "Text"], Cell[7044, 244, 218, 6, 62, "Input"], Cell[7265, 252, 60, 0, 33, "Text"], Cell[7328, 254, 158, 2, 50, "Input"], Cell[7489, 258, 36, 0, 33, "Text"], Cell[7528, 260, 53, 1, 30, "Input"], Cell[7584, 263, 109, 3, 33, "Text"], Cell[7696, 268, 413, 12, 95, "Input", InitializationCell->True], Cell[8112, 282, 55, 0, 33, "Text"], Cell[8170, 284, 395, 12, 95, "Input"], Cell[8568, 298, 71, 0, 33, "Text"], Cell[8642, 300, 158, 2, 50, "Input"], Cell[8803, 304, 50, 0, 33, "Text"], Cell[8856, 306, 53, 1, 30, "Input"], Cell[8912, 309, 53, 0, 33, "Text"], Cell[8968, 311, 158, 2, 50, "Input"], Cell[9129, 315, 45, 0, 33, "Text"], Cell[9177, 317, 53, 1, 30, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[9267, 323, 25, 0, 39, "Section"], Cell[9295, 325, 91, 3, 33, "Text"], Cell[9389, 330, 215, 6, 62, "Input", InitializationCell->True], Cell[9607, 338, 100, 3, 33, "Text"], Cell[9710, 343, 223, 6, 62, "Input"], Cell[9936, 351, 60, 0, 33, "Text"], Cell[9999, 353, 161, 2, 50, "Input"], Cell[10163, 357, 53, 0, 33, "Text"], Cell[10219, 359, 53, 1, 30, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[10309, 365, 31, 0, 39, "Section"], Cell[10343, 367, 459, 7, 90, "Text"], Cell[10805, 376, 301, 8, 80, "Input", InitializationCell->True], Cell[11109, 386, 55, 0, 33, "Text"], Cell[11167, 388, 552, 16, 133, "Input"], Cell[11722, 406, 573, 10, 90, "Text"], Cell[12298, 418, 376, 8, 80, "Input", InitializationCell->True], Cell[12677, 428, 66, 0, 33, "Text"], Cell[12746, 430, 67, 1, 30, "Input"], Cell[12816, 433, 70, 0, 33, "Text"], Cell[12889, 435, 81, 1, 30, "Input"], Cell[12973, 438, 40, 0, 33, "Text"], Cell[13016, 440, 211, 3, 50, "Input"], Cell[13230, 445, 61, 0, 33, "Text"], Cell[13294, 447, 53, 1, 30, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[13384, 453, 56, 0, 39, "Section"], Cell[13443, 455, 270, 5, 52, "Text"], Cell[13716, 462, 291, 8, 80, "Input", InitializationCell->True], Cell[14010, 472, 515, 16, 110, "Input"], Cell[14528, 490, 147, 3, 33, "Text"], Cell[14678, 495, 66, 1, 30, "Input"], Cell[14747, 498, 42, 0, 33, "Text"], Cell[14792, 500, 80, 1, 30, "Input"], Cell[14875, 503, 25, 0, 33, "Text"], Cell[14903, 505, 188, 3, 50, "Input"], Cell[15094, 510, 63, 0, 33, "Text"], Cell[15160, 512, 53, 1, 30, "Input"], Cell[15216, 515, 94, 3, 33, "Text"], Cell[15313, 520, 1274, 35, 312, "Input", InitializationCell->True] }, Closed]], Cell[CellGroupData[{ Cell[16624, 560, 44, 0, 39, "Section"], Cell[16671, 562, 378, 6, 90, "Text"], Cell[17052, 570, 110, 2, 30, "Input"], Cell[17165, 574, 53, 0, 33, "Text"], Cell[17221, 576, 133, 3, 50, "Input"], Cell[17357, 581, 31, 0, 33, "Text"], Cell[17391, 583, 267, 5, 110, "Input"], Cell[17661, 590, 45, 0, 33, "Text"], Cell[17709, 592, 53, 1, 30, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[17799, 598, 36, 0, 39, "Section"], Cell[CellGroupData[{ Cell[17860, 602, 65, 0, 47, "Subsection"], Cell[17928, 604, 550, 8, 109, "Text"], Cell[18481, 614, 383, 9, 126, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[18901, 628, 54, 0, 31, "Subsection"], Cell[18958, 630, 633, 9, 128, "Text"], Cell[19594, 641, 430, 10, 147, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[20061, 656, 35, 0, 31, "Subsection"], Cell[20099, 658, 375, 6, 90, "Text"], Cell[20477, 666, 359, 8, 126, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[20873, 679, 36, 0, 31, "Subsection"], Cell[20912, 681, 531, 8, 109, "Text"], Cell[21446, 691, 354, 8, 126, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[21837, 704, 36, 0, 31, "Subsection"], Cell[21876, 706, 551, 8, 109, "Text"], Cell[22430, 716, 447, 10, 190, "Input"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[22926, 732, 44, 0, 39, "Section"], Cell[22973, 734, 699, 11, 147, "Text"] }, Closed]] }, Open ]] } ] *) (*********************************************************************** End of Mathematica Notebook file. ***********************************************************************)