(************** Content-type: application/mathematica ************** Mathematica-Compatible Notebook This notebook can be used with any Mathematica-compatible application, such as Mathematica, MathReader or Publicon. 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[ 9478, 287]*) (*NotebookOutlinePosition[ 10219, 312]*) (* CellTagsIndexPosition[ 10175, 308]*) (*WindowFrame->Normal*) Notebook[{ Cell["\<\ Go through this entire notebook. Answer all the questions posed. On the You Try It, you MUST insert your own NEW values or functions. Print out your results and attach to a 1-page summary of what you learned \ from this lab.\ \>", "Subsubtitle"], Cell[CellGroupData[{ Cell["Getting Started in Plotting Lines and Planes in 3D", "Title"], Cell[TextData[StyleBox["Chapter 10, Sections 3 ", FontFamily->"Arial", FontSize->16, FontWeight->"Bold"]], "Text"], Cell[CellGroupData[{ Cell["Introduction", "Section"], Cell[TextData[{ "OBJECTIVE: To learn to use ", StyleBox["Mathematica", FontSlant->"Italic"], " to plot lines and planes" }], "Text"], Cell[TextData[{ "In this module, you will learn how ", StyleBox["Mathematica", FontSlant->"Italic"], " can help you plot the lines and planes you have been reading about. In \ the process of plotting lines and planes, you will gain insight into their \ vector definitions." }], "Text"], Cell[CellGroupData[{ Cell["Technology Guidelines", "Subsection", CellDingbat->"\[LightBulb]"], Cell[TextData[{ StyleBox["NOTE: If you have just finished a module, restart ", CellFrame->True, Background->None], StyleBox["Mathematica", CellFrame->True, FontSlant->"Italic", Background->None], StyleBox[ " before executing a new module.\nTO OPEN CELLS, put your cursor on the \ right cell bracket and double click.", CellFrame->True, Background->None], "\nTO STOP AN EXECUTION\n\tSelect the ", StyleBox["Kernel", FontSlant->"Italic"], " pull-down menu and click on ", StyleBox["Abort Evaluation.\n", FontSlant->"Italic"], "ORDER OF EXECUTION\n\tExecute cells in the order given. Do not skip any \ Input cells within a given notebook.\nSAVING NOTEBOOKS\n\tYou can save \ anytime to any directory you choose, and it is wise to save often.\n\t\ However, before you do your final save, delete all your output by selecting \ the \n\t ", StyleBox["Delete All Output", FontSlant->"Italic"], " selection under the ", StyleBox["Kernel", FontSlant->"Italic"], " pull-down menu.\nEXPERIENCING MAJOR PROBLEMS\n\tSave if appropriate, and \ then shut down ", StyleBox["Mathematica", FontSlant->"Italic"], " and start it up again." }], "Text"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["Lines and Planes", "Section"], Cell[CellGroupData[{ Cell[TextData[StyleBox["Interpreting Lines Using Their Vector Definition", FontSize->14]], "Subsection"], Cell["\<\ You can construct straight lines in two and three dimensions using the vector \ definition. Given two points on the line, we will first determine the \ direction of the line and then write any other point on the line as the \ position vector to that point plus a multiple (t) of the vector in the \ direction of the line. We will start with two points, finding the direction \ determined by those two points, and then writing and plotting the parametric \ equations for the line in three dimensions.\ \>", "Text"], Cell["", "Text"], Cell[BoxData[{ \(Clear[x, y, z, t]\), \(origin = {0, 0, 0}; \np1 = {1, 5, \(-6\)}; \np2 = {4, 2, 5}; \n Print["\", dir = p1 - p2]\), \(Print["\<{x,y,z} = \>", eqs = \((p1 - origin)\) + t\ dir]\), \(\(ParametricPlot3D[Evaluate[eqs], {t, \(-10\), 10}, Boxed \[Rule] False, Axes \[Rule] True, AxesLabel -> {x, y, z}]; \)\)}], "Input"] }, Closed]], Cell[CellGroupData[{ Cell[TextData[StyleBox["Constructing Planes Using Vectors", FontSize->14]], "Subsection"], Cell[TextData[{ "We begin by constructing a plane from three points on the plane. We use \ those three points to determine two directions in the plane and then compute \ other points on the plane by adding their position vector to a linear \ combination (using parameters ", StyleBox["s", FontSlant->"Italic"], " and ", StyleBox["t", FontSlant->"Italic"], ") of the known vectors in the plane." }], "Text"], Cell[BoxData[{ \(Clear[x, y, z, s, t, p1, p2, p3, pts]\), \(origin = {0, 0, 0}; \np1 = {2, 3, \(-1\)}; \np2 = {8, \(-2\), 5}; \n p3 = {\(-4\), 0, 9}; \n Print["\<{x,y,z} = \>", pts = Simplify[\((p1 - origin)\) + s\ \((p2 - p1)\) + t\ \((p3 - p2)\)]] \)}], "Input"], Cell[TextData[{ "We can also find the equation of the plane using the cross product to find \ the normal vector to the plane. Then we can find the points", Cell[BoxData[ \(TraditionalForm\`\(\ \((x, \ y, \ z)\)\)\)]], " that lie in the plane by dotting any vector in the plane into that normal \ vector and setting the dot product equal to 0. " }], "Text", Evaluatable->False], Cell[BoxData[{ \(vec1 = p2 - p1; \nvec2 = p3 - p2; \nnormal = Cross[vec1, vec2]; \n eq = normal . \(({x, y, z} - p1)\) == 0; \nsol = Solve[eq, z]\), \(\(Plot3D[ sol\[LeftDoubleBracket]1, 1, 2\[RightDoubleBracket], {x, \(-10\), 10}, { y, \(-10\), 10}, AxesLabel -> {"\", "\", "\"}]; \)\)}], "Input"], Cell[TextData[{ "Note that the relationships among ", Cell[BoxData[ \(TraditionalForm\`x, \ y\)]], ", and ", Cell[BoxData[ \(TraditionalForm\`z\)]], " are exactly the same in both parametric and nonparametric form." }], "Text"], Cell[BoxData[{ \(Clear[x, y, z]\), \(sol\), \({x, y, z} = pts\), \(z == sol[\([1, 1, 2]\)] // Simplify\)}], "Input"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["You Try It", "Section"], Cell[CellGroupData[{ Cell["Finding equations of lines", "Subsection"], Cell["\<\ To find the equations of lines and planes, just change the numbers in the \ points given, then re-execute the commands to see other lines. You can \ replace the red items in the following input commands to create a new line.\ \>", "Text"], Cell[BoxData[{\(Clear[x, y, z, t]\), RowBox[{\(origin = {0, 0, 0}\), ";", "\n", RowBox[{"p1", "=", RowBox[{"{", StyleBox[\(2, \(-3\), 0\), FontColor->RGBColor[1, 0, 0]], "}"}]}], ";", "\n", RowBox[{"p2", "=", RowBox[{"{", StyleBox[\(\(-1\), 8, 4\), FontColor->RGBColor[1, 0, 0]], "}"}]}], ";", "\n", \(Print["\", dir = p1 - p2]\)}], \(Print["\<{x,y,z} = \>", eqs = \((p1 - origin)\) + t\ dir]\), \(ParametricPlot3D[Evaluate[eqs], {t, \(-10\), 10}, Boxed \[Rule] False, Axes \[Rule] True, AxesLabel -> {x, y, z}]; \)}], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["Finding equations of planes", "Subsection"], Cell["\<\ Now, pick any 3 points, replace the red numbers with your points, and execute \ the cell to see the plane determined by the three points.\ \>", "Text"], Cell[BoxData[{\(Clear[x, y, z, s, t, p1, p2, p3, pts]\), RowBox[{\(origin = {0, 0, 0}\), ";", "\n", RowBox[{"p1", "=", RowBox[{"{", StyleBox[\(\(-2\), 5, 1\), FontColor->RGBColor[1, 0, 0]], "}"}]}], ";", "\n", RowBox[{"p2", "=", RowBox[{"{", StyleBox[\(0, 3, \(-4\)\), FontColor->RGBColor[1, 0, 0]], "}"}]}], ";", "\n", RowBox[{"p3", "=", RowBox[{"{", StyleBox[\(1, 0, 7\), FontColor->RGBColor[1, 0, 0]], "}"}]}], ";", "\n", \(Print["\<{x,y,z} = \>", pts = Simplify[ \((p1 - origin)\) + s\ \((p2 - p1)\) + t\ \((p3 - p2)\)]]\)}], \(vec1 = p2 - p1; \nvec2 = p3 - p2; \nnormal = Cross[vec1, vec2]\), \(eq = normal . \(({x, y, z} - p1)\) == 0; \nsol = Solve[eq, z]\), \(Plot3D[sol\[LeftDoubleBracket]1, 1, 2\[RightDoubleBracket], {x, \(-10\), 10}, {y, \(-10\), 10}, AxesLabel -> {"\", "\", "\"}]; \)}], "Input"] }, Closed]] }, Closed]] }, Open ]] }, FrontEndVersion->"4.1 for Microsoft Windows", ScreenRectangle->{{0, 1024}, {0, 695}}, WindowSize->{714, 521}, WindowMargins->{{41, Automatic}, {Automatic, 44}}, PrintingCopies->1, PrintingPageRange->{Automatic, Automatic}, StyleDefinitions -> "Default.nb" ] (******************************************************************* 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[1705, 50, 255, 5, 89, "Subsubtitle"], Cell[CellGroupData[{ Cell[1985, 59, 67, 0, 170, "Title"], Cell[2055, 61, 120, 3, 37, "Text"], Cell[CellGroupData[{ Cell[2200, 68, 31, 0, 59, "Section"], Cell[2234, 70, 142, 5, 33, "Text"], Cell[2379, 77, 295, 7, 52, "Text"], Cell[CellGroupData[{ Cell[2699, 88, 74, 1, 47, "Subsection"], Cell[2776, 91, 1209, 34, 242, "Text"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[4034, 131, 35, 0, 39, "Section"], Cell[CellGroupData[{ Cell[4094, 135, 106, 1, 47, "Subsection"], Cell[4203, 138, 524, 8, 90, "Text"], Cell[4730, 148, 16, 0, 33, "Text"], Cell[4749, 150, 398, 7, 170, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[5184, 162, 91, 1, 31, "Subsection"], Cell[5278, 165, 424, 11, 90, "Text"], Cell[5705, 178, 294, 6, 150, "Input"], Cell[6002, 186, 390, 8, 90, "Text", Evaluatable->False], Cell[6395, 196, 340, 6, 150, "Input"], Cell[6738, 204, 249, 8, 52, "Text"], Cell[6990, 214, 135, 4, 90, "Input"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[7174, 224, 29, 0, 39, "Section"], Cell[CellGroupData[{ Cell[7228, 228, 48, 0, 47, "Subsection"], Cell[7279, 230, 248, 4, 52, "Text"], Cell[7530, 236, 662, 13, 170, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[8229, 254, 49, 0, 31, "Subsection"], Cell[8281, 256, 161, 3, 52, "Text"], Cell[8445, 261, 993, 21, 250, "Input"] }, Closed]] }, Closed]] }, Open ]] } ] *) (******************************************************************* End of Mathematica Notebook file. *******************************************************************)