Arrows and Polygons

Arrows

In[1]:=

<<Graphics`Graphics`

<<Graphics`Colors`

<<Graphics`Arrow`

In[4]:=

DisplayTogether[graphPaper = Plot[0, {x, -2, 2}, PlotRange {-2, 2}], ... 1; {DeepSkyBlue, Arrow[{0, 0}, {1, 1}], ForestGreen, Arrow[{.75, .25}, {.25, .75}]}]]] ;

[Graphics:HTMLFiles/3_arrows_5.gif]

Crystal Lattice of Titanium

The Arrow3D package is available from MathSource at Wolfram Research.

In[5]:=

<<Arrow3D`Arrow3D`

In[6]:=

showColorful3DVectors[vecs_, shaftColor_, headColor_, opts___] := Module[{o = {0, 0, 0}, i = ... headColor],  {i, Length[vecs]}]}]], opts, ViewPoint {6, 2, 2} ]]

Three vectors form a basis for the unit cell in the crystal lattice of Titanium.
    Their coordinates are given in Angstroms.
    See Lay, Exercises 4.4.37-38, p255.

In[7]:=

o = {0, 0, 0} ;

u = {2.6, -1.5, 0} ;

v = {0, 3, 0} ;

w = {0, 0, 4.8} ;

The unit cell in the crystal lattice of Titanium is the parallelopiped determined by these three vectors.

In[11]:=

titaniumUnitCell = { {o, u}, {o, v}, {u, v}, {v, u},  {w, u}, {w, v}, {w + u, v}, {w + v, u},  {o, w}, {u, w}, {v, w}, {u + v, w}} ; 

cell = showColorful3DVectors[titaniumUnitCell, MediumTurquoise, White, DefaultColor->ChromeOxideGreen] ;

[Graphics:HTMLFiles/3_arrows_14.gif]

Polygons

In[13]:=

o = {0, 0} ;

e1 = {1, 0} ;

e2 = {0, 1} ; 

vertices = {o, e1, e1 + e2, e2} ; 

unitSquare = Polygon[vertices] ;

In[18]:=

DisplayTogether[graphPaper = Plot[0, {x, -2, 2}, AspectRatio1, PlotRange {-2, 2}], square = Show[Graphics[ {Red, unitSquare}]]] ;

[Graphics:HTMLFiles/3_arrows_21.gif]

Image of a Polygon Under a Linear Map

In[19]:=

a = ( {{1, 2}, {3, 1}} ) ; 

L[pt_] := a . pt

imageL = Polygon[Map[L, vertices]]

Out[21]=

Polygon[{{0, 0}, {1, 3}, {3, 4}, {2, 1}}]

In[22]:=

DisplayTogether[graphPaper = Plot[0, {x, 0, 3}, AspectRatio1, PlotRange {0, 4}], poly = Show[Graphics[ {LightCadmiumYellow, imageL}]]] ;

[Graphics:HTMLFiles/3_arrows_27.gif]


Created by Mathematica  (February 20, 2005) Valid XHTML 1.1!