(***********************************************************************
Mathematica-Compatible Notebook
This notebook can be used on any computer system with Mathematica 3.0,
MathReader 3.0, or any compatible application. The data for the notebook
starts with the line of 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[ 16723, 377]*)
(*NotebookOutlinePosition[ 17805, 414]*)
(* CellTagsIndexPosition[ 17761, 410]*)
(*WindowFrame->Normal*)
Notebook[{
Cell[CellGroupData[{Cell[TextData["IntroVectors"], "Title",
Evaluatable->False,
AspectRatioFixed->True],
Cell[TextData["Version 2.0\n11/4/92\nJohn B. Schneider"], "Subsubtitle",
Evaluatable->False,
AspectRatioFixed->True]}, Open]],
Cell[CellGroupData[{Cell[TextData["Introduction"], "Section",
Evaluatable->False,
AspectRatioFixed->True],
Cell[TextData[
" Vectors have both a magnitude and a direction. It is important that \
you understand two different types of vectors. In this NoteBook we will \
discuss position vectors and distance (or displacement) vectors. Position \
vectors indicate a position relative to the origin while distance vectors \
indicate a magnitude and direction from one point in space (generally not the \
origin) to another.\n \n We will discuss two-dimensional position and \
displacement vectors in the Cartesian and cylindrical (polar) coordinate \
systems."], "Text",
Evaluatable->False,
AspectRatioFixed->True]}, Open]],
Cell[CellGroupData[{Cell[TextData["Vectors in Cartesian Coordinates"], "Section",
Evaluatable->False,
AspectRatioFixed->True],
Cell[CellGroupData[{Cell[TextData["Position vectors."], "Subsection",
Evaluatable->False,
AspectRatioFixed->True],
Cell[TextData[
" A position vector indicates the distance and direction from the origin \
to a point in space. For example, the position of an airplane relative to a \
fixed coordinate system could be described with a position vector. Of \
course, this position vector would be a function of time. The magnitude of \
the vector would give the distance to the airplane and the direction from the \
origin would be given by the direction of the vector.\n \n The \
program below defines a function that will plot a vector from the origin to a \
user specified point. The assumption is made that point of interest is \
within the region bounded by \[PlusMinus]5 <= x <= 5 and \[PlusMinus]5 <= y \
<= 5 (feel free to change these limits). The position vector itself is red. \
The function additionally shows the x and y unit vectors in blue. The \
purpose of the unit vectors will become more clear later."], "Text",
Evaluatable->False,
AspectRatioFixed->True],
Cell[TextData[
"Off[General::Spell];\npositionVector[x_,y_] :=\n\
Block[{pVect,xUnit,yUnit,xMin=-5,xMax=5,yMin=-5,yMax=5},\n pVect = \
Line[{{0,0},{x,y}}];\n xUnit = Line[{{x,y},{x+1,y}}];\n yUnit = \
Line[{{x,y},{x,y+1}}];\n Show[Graphics[{axes[xMin,xMax,yMin,yMax],\n \
RGBColor[1,0,0],pVect,\n RGBColor[0,0,1],xUnit,yUnit}\n ],\n \
PlotRange->All,\n AspectRatio -> (yMax-yMin)/(xMax-xMin)\n ]\n ]"],
"Input",
InitializationCell->True,
AspectRatioFixed->True],
Cell[TextData[
" Try this function for a few combinations of end points and convince \
yourself that it really does draw a position vector from the origin to the \
point you specify."], "Text",
Evaluatable->False,
AspectRatioFixed->True],
Cell[TextData["positionVector[ 1, 3 ]"], "Input",
AspectRatioFixed->True],
Cell[TextData[
" The following command will generate a sequence of graphics (that can be \
animated if you wish). In this sequence the end point of the position vector \
will move in a circle with a radius of three. The x position is 3 cos(phi) \
and the y position is 3 sin(phi), where phi goes from 0 to 350 degrees in 10 \
degree increments."], "Text",
Evaluatable->False,
AspectRatioFixed->True],
Cell[TextData[
"Table[\n positionVector[ 3 Cos[dum`i Pi/180], 3 Sin[dum`i Pi/180] ],\n \
{dum`i,0,350,10}\n ]"], "Input",
AspectRatioFixed->True],
Cell[TextData[
" Note that no matter where the end point of the position vector is, the \
x and y unit vectors always point in fixed directions. The x unit vector \
always points in the positive x direction and the y unit vector always points \
in the positive y direction. As you will see, unit vectors do not point in \
constant directions in the cylindrical (or spherical) coordinate systems."],
"Text",
Evaluatable->False,
AspectRatioFixed->True]}, Open]],
Cell[CellGroupData[{Cell[TextData["Distance vectors."], "Subsection",
Evaluatable->False,
AspectRatioFixed->True],
Cell[TextData[
" A distance or displacement vector specifies a magnitude and direction \
from a point in space other than the origin. A displacement vector can be \
used to indicate the speed and direction of an airplace. For example, when \
the plane is at the point (1,3) its speed is 2 units horizontally and 0.5 \
units vertically. The displacement vector is therefore (2,0.5) and it is \
drawn with its base at the point (1,3).\n \n The following program \
defines a function that will draw a position vector to the base of the \
displacement vector and then draw the displacement vector from that point. \
The position vector and unit vectors are drawn as before. The displacement \
vector is drawn in black."], "Text",
Evaluatable->False,
AspectRatioFixed->True],
Cell[TextData[
"distanceVector[x_,y_,x1_,y1_] :=\n\
Block[{dVect,pVect,xUnit,yUnit,xMin=-5,xMax=5,yMin=-5,yMax=5},\n dVect = \
Line[{{x,y},{x+x1,y+y1}}];\n pVect = Line[{{0,0},{x,y}}];\n xUnit = \
Line[{{x,y},{x+1,y}}];\n yUnit = Line[{{x,y},{x,y+1}}];\n \
Show[Graphics[{axes[xMin,xMax,yMin,yMax],dVect,\n RGBColor[1,0,0],pVect,\n\
RGBColor[0,0,1],xUnit,yUnit}],\n PlotRange -> All,\n AspectRatio \
-> (yMax-yMin)/(xMax-xMin)\n ]\n ]"], "Input",
InitializationCell->True,
AspectRatioFixed->True],
Cell[TextData[
" The following command will display the position and displacement \
vectors. The first two arguments give the x and y coordinates to the base of \
the displacement vector. The next two arguments indicate the distance along \
the x unit vector and the distance along the y unit vector for the \
displacement vector itself."], "Text",
Evaluatable->False,
AspectRatioFixed->True],
Cell[TextData[
"distanceVector[(*position*) 1,3, (*displacement*) 2,0.5 ]"], "Input",
AspectRatioFixed->True],
Cell[TextData[
" We can again generate a sequence similar to the one for the position \
vector. The x and y components move in a circle, but the x and y \
displacement are held fixed at 2 and 0.5, respectively."], "Text",
Evaluatable->False,
AspectRatioFixed->True],
Cell[TextData[
"Table[\n distanceVector[ 3 Cos[dum`i Pi/180], 3 Sin[dum`i Pi/180], 2, 0.5 \
],\n {dum`i,0,350,10}\n ]"], "Input",
AspectRatioFixed->True],
Cell[TextData[
" Notice that the orientation of the displacement vector does not change. \
It is always two units to the \[Trademark]right\[Integral] and 0.5 units \
\[Trademark]up.\[Integral]"], "Text",
Evaluatable->False,
AspectRatioFixed->True]}, Open]]}, Open]],
Cell[CellGroupData[{Cell[TextData["Vectors in Polar Coordinates."], "Section",
Evaluatable->False,
AspectRatioFixed->True],
Cell[CellGroupData[{Cell[TextData["Position Vectors"], "Subsection",
Evaluatable->False,
AspectRatioFixed->True],
Cell[TextData[
" In two-dimensional polar coordinates, a position vector is described by \
a radius from the origin and an angle from the positive x axis. The \
following program defines a function to draw a position vector where the \
radius (r) and the angle (p) are specified by the user. Again, the function \
is defined to draw the axes over the region \[PlusMinus]5 <= x <= 5 and \
\[PlusMinus]5 <= y <= 5. This function draws the position vector in red and \
the r and p unit vectors in green."], "Text",
Evaluatable->False,
AspectRatioFixed->True],
Cell[TextData[
"positionVectorRP[r_,p_] :=\nBlock[{pVect,x,y,rUnit,pUnit,cosp,sinp,\n \
xMin=-5,xMax=5,yMin=-5,yMax=5},\n (* Cos[p] and Sin[p] are used more than \
once so\n calculate them once here and use again later. *)\n cosp = \
Cos[p];\n sinp = Sin[p];\n x = r cosp;\n y = r sinp;\n dVect = \
Line[{{0,0},{x,y}}];\n pVect = Line[{{0,0},{x,y}}];\n rUnit = \
Line[{{x,y},{x+cosp,y+sinp}}];\n pUnit = Line[{{x,y},{x-sinp,y+cosp}}];\n \
Show[Graphics[{axes[xMin,xMax,yMin,yMax],\n RGBColor[1,0,0],pVect,\n \
RGBColor[0,1,0],rUnit,pUnit}],\n PlotRange -> All,\n AspectRatio -> \
(yMax-yMin)/(xMax-xMin)\n ]\n ]"], "Input",
InitializationCell->True,
AspectRatioFixed->True],
Cell[TextData[
" Here is the function set up and ready to use but feel free to change \
the arguments. Note that the angular dimension is specified in radians. (To \
use degrees, make sure you multiply the value in degrees by Pi/180 to get \
radians. In the command below, the p value is initially 30 degrees.)"],
"Text",
Evaluatable->False,
AspectRatioFixed->True],
Cell[TextData["positionVectorRP[ 3, 30 Pi/180 ]"], "Input",
AspectRatioFixed->True],
Cell[TextData[
" Note the behavior of the unit vectors. The r unit vector always points \
in the direction the position vector would move if r were increased and p \
was unchanged. However, the direction of r depends on p. Therefore, the r \
unit vector does not point in a fixed direction the way the x and y unit \
vectors did in the Cartesian coordinate system. The p unit vector always \
points in the direction the position vector would move if p were increased \
and r was unchanged. Of course, the length of both unit vectors is one.\n \
\n The command below generates a sequence of graphics where the radius \
is held at three and p ranges from 0 to 350 in 10 degree increments. These \
are the same positions that were used in the Cartesian coordinate sequences. \
Position vectors describe a physical \[Trademark]truth\[Integral] that is \
independent of the coordinate system you are using. The airplane is at the \
same point in space whether you are using Cartesian coordinates or polar \
coordinates. All that changes is how you describe that point."], "Text",
Evaluatable->False,
AspectRatioFixed->True],
Cell[TextData[
"Table[positionVectorRP[3, dum`i Pi/180],\n {dum`i,0,350,10}\n ]"],
"Input",
AspectRatioFixed->True],
Cell[TextData[
" Note the movement of the unit vectors as the position moves."], "Text",
Evaluatable->False,
AspectRatioFixed->True]}, Open]],
Cell[CellGroupData[{Cell[TextData["Displacement Vectors"], "Subsection",
Evaluatable->False,
AspectRatioFixed->True],
Cell[TextData[
" The following program defines a function to draw a displacement vector \
where the base of the vector is specified as a radius from the origin and an \
angle from the x axis. The displacement vector itself is specified by a \
distance along the r unit vector and a distance along the p unit vector. The \
displacement vector is drawn in black."], "Text",
Evaluatable->False,
AspectRatioFixed->True],
Cell[TextData[
"distanceVectorRP[r_,p_,r1_,phiDistance_] :=\n\
Block[{dVect,pVect,x,y,rUnit,pUnit,cosp,sinp,\n \
xMin=-5,xMax=5,yMin=-5,yMax=5},\n (* Cos[p] and Sin[p] are used more than \
once so\n calculate them once here and use again later. *)\n cosp = \
Cos[p];\n sinp = Sin[p];\n x = r cosp;\n y = r sinp;\n dVect = \n \
Line[{{x,y},\n {x+r1 cosp-phiDistance sinp,\n y+r1 sinp+phiDistance \
cosp}}];\n pVect = Line[{{0,0},{x,y}}];\n rUnit = \
Line[{{x,y},{x+cosp,y+sinp}}];\n pUnit = Line[{{x,y},{x-sinp,y+cosp}}];\n \
Show[Graphics[{axes[xMin,xMax,yMin,yMax],dVect,\n RGBColor[1,0,0],pVect,\n\
RGBColor[0,1,0],rUnit,pUnit}],\n PlotRange -> All,\n AspectRatio \
-> (yMax-yMin)/(xMax-xMin)\n ]\n ]"], "Input",
InitializationCell->True,
AspectRatioFixed->True],
Cell[TextData[
" The displacement vector is specified by two distances, a distance along \
the r unit vector and a distance along the p unit vector. This is not \
another radius and angle. It is similar to the displacement vectors in the \
Cartesian coordiante system in that we are specifying two distances. \
However, in the polar coordinate system the unit vectors are not constant.\n \
\n The following command will draw a position vector, the unit vectors \
associated with that position, and the displacement vector. Please change \
the arguments to whatever you want. Initially, the arguments are for a \
position vector that is 3 units long and forms a 30 degree angle with the \
positive x axis. The displacement vector is 2 units along the r unit vector \
(or 2 units in the r direction) and 0.5 units along the p unit vector."],
"Text",
Evaluatable->False,
AspectRatioFixed->True],
Cell[TextData["distanceVectorRP[3,30 Pi/180,2,0.5]"], "Input",
AspectRatioFixed->True],
Cell[TextData[
" The command below will again create a sequence of graphics where the \
end point of the position vector moves in a circle. In this command, the \
displacement vector is always 2 units in the r direction and 0.5 units in the \
p direction. Note how the displacement vectors changes with different \
position vectors."], "Text",
Evaluatable->False,
AspectRatioFixed->True],
Cell[TextData[
"Table[distanceVectorRP[3, dum`i Pi/180,2,0.5],\n {dum`i,0,350,10}\n ]"],
"Input",
AspectRatioFixed->True]}, Open]]}, Open]],
Cell[CellGroupData[{Cell[TextData["Conclusions"], "Section",
Evaluatable->False,
AspectRatioFixed->True],
Cell[TextData[
" This NoteBook illustrated the difference between position vectors and \
displacement vectors in two different coordinate systems. It was shown that \
unit vectors point in a constant direction in the Cartesian coordinate system \
but that their orientation is position dependent in the cylindrical \
coordinate system. Position vectors are described by two distances in the \
Cartesian coordinate system and by a distance and an angle in the cylindrical \
coordinate system. However, displacement vectors are specified by two \
distances in both coordinate systems.\n \n Although the illstrations \
were restricted to two dimensions, the same concepts hold in three \
dimensions. For example, in spherical coordinates a position vector would be \
described by a distance and two angles. However, a displacement vector would \
consist of three distances \[Dash] the distance in the r direction, the \
distance in the theta direction, and the distance in the phi direction."],
"Text",
Evaluatable->False,
AspectRatioFixed->True]}, Open]],
Cell[CellGroupData[{Cell[TextData["Initialization Cells"], "Section",
Evaluatable->False,
AspectRatioFixed->True],
Cell[TextData[
"The following command is used in the drawing of the axes."], "Text",
Evaluatable->False,
AspectRatioFixed->True],
Cell[TextData[
"axes[x0_,x1_,y0_,y1_] := \nBlock[{tick,x,y},\n tick = .02 \
Min[{x1-x0,y1-y0}];\n {(* x axis *) Line[{{0,y0},{0,y1}}],\n (* y axis *) \
Line[{{x0,0},{x1,0}}],\n (* x axis tick marks *) \
Table[Line[{{x,-tick},{x,tick}}],{x,x0,x1}],\n (* y axis tick marks *) \
Table[Line[{{-tick,y},{tick,y}}],{y,y0,y1}]}\n ]"], "Input",
InitializationCell->True,
AspectRatioFixed->True]}, Open]]
},
FrontEndVersion->"Macintosh 3.0",
ScreenRectangle->{{0, 640}, {0, 460}},
AutoGeneratedPackage->None,
WindowToolbars->{},
CellGrouping->Manual,
WindowSize->{520, 365},
WindowMargins->{{44, Automatic}, {Automatic, 1}},
PrivateNotebookOptions->{"ColorPalette"->{RGBColor, -1}},
ShowCellLabel->True,
ShowCellTags->False,
RenderingOptions->{"ObjectDithering"->True,
"RasterDithering"->False},
MacintoshSystemPageSetup->"\<\
AVU/IFiQKFD000000W7D@09ag@0000000O=J`09FV"
]
(***********************************************************************
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[1731, 51, 87, 2, 70, "Title",
Evaluatable->False],
Cell[1821, 55, 120, 2, 70, "Subsubtitle",
Evaluatable->False]
}, Closed]],
Cell[CellGroupData[{
Cell[1973, 59, 89, 2, 70, "Section",
Evaluatable->False],
Cell[2065, 63, 622, 10, 70, "Text",
Evaluatable->False]
}, Closed]],
Cell[CellGroupData[{
Cell[2719, 75, 109, 2, 70, "Section",
Evaluatable->False],
Cell[CellGroupData[{
Cell[2851, 79, 97, 2, 70, "Subsection",
Evaluatable->False],
Cell[2951, 83, 978, 14, 70, "Text",
Evaluatable->False],
Cell[3932, 99, 506, 9, 70, "Input",
InitializationCell->True],
Cell[4441, 110, 245, 5, 70, "Text",
Evaluatable->False],
Cell[4689, 117, 75, 1, 70, "Input"],
Cell[4767, 120, 409, 7, 70, "Text",
Evaluatable->False],
Cell[5179, 129, 153, 3, 70, "Input"],
Cell[5335, 134, 463, 8, 70, "Text",
Evaluatable->False]
}, Closed]],
Cell[CellGroupData[{
Cell[5830, 144, 97, 2, 70, "Subsection",
Evaluatable->False],
Cell[5930, 148, 790, 12, 70, "Text",
Evaluatable->False],
Cell[6723, 162, 527, 9, 70, "Input",
InitializationCell->True],
Cell[7253, 173, 402, 7, 70, "Text",
Evaluatable->False],
Cell[7658, 182, 111, 2, 70, "Input"],
Cell[7772, 186, 275, 5, 70, "Text",
Evaluatable->False],
Cell[8050, 193, 161, 3, 70, "Input"],
Cell[8214, 198, 256, 5, 70, "Text",
Evaluatable->False]
}, Closed]]
}, Closed]],
Cell[CellGroupData[{
Cell[8511, 205, 106, 2, 70, "Section",
Evaluatable->False],
Cell[CellGroupData[{
Cell[8640, 209, 96, 2, 70, "Subsection",
Evaluatable->False],
Cell[8739, 213, 566, 9, 70, "Text",
Evaluatable->False],
Cell[9308, 224, 718, 11, 70, "Input",
InitializationCell->True],
Cell[10029, 237, 379, 7, 70, "Text",
Evaluatable->False],
Cell[10411, 246, 85, 1, 70, "Input"],
Cell[10499, 249, 1145, 16, 70, "Text",
Evaluatable->False],
Cell[11647, 267, 124, 3, 70, "Input"],
Cell[11774, 272, 140, 3, 70, "Text",
Evaluatable->False]
}, Closed]],
Cell[CellGroupData[{
Cell[11946, 277, 100, 2, 70, "Subsection",
Evaluatable->False],
Cell[12049, 281, 425, 7, 70, "Text",
Evaluatable->False],
Cell[12477, 290, 823, 13, 70, "Input",
InitializationCell->True],
Cell[13303, 305, 916, 14, 70, "Text",
Evaluatable->False],
Cell[14222, 321, 88, 1, 70, "Input"],
Cell[14313, 324, 397, 7, 70, "Text",
Evaluatable->False],
Cell[14713, 333, 130, 3, 70, "Input"]
}, Closed]]
}, Closed]],
Cell[CellGroupData[{
Cell[14884, 338, 88, 2, 70, "Section",
Evaluatable->False],
Cell[14975, 342, 1067, 16, 70, "Text",
Evaluatable->False]
}, Closed]],
Cell[CellGroupData[{
Cell[16074, 360, 97, 2, 70, "Section",
Evaluatable->False],
Cell[16174, 364, 132, 3, 70, "Text",
Evaluatable->False],
Cell[16309, 369, 402, 7, 70, "Input",
InitializationCell->True]
}, Closed]]
}
]
*)
(***********************************************************************
End of Mathematica Notebook file.
***********************************************************************)