arrow - Maple Help

plots

 arrow
 plot an arrow or a vector

 Calling Sequence arrow(u, opts) arrow(u, v, opts) arrow(U, opts)

Parameters

 u, v - lists, Vectors, a set (or list) of lists, a set (or list) of Vectors U - set or list containing lists of pairs of Vectors or lists opts - (optional) equation(s) of the form option=value where option is one of shape, length, width, head_width, head_length, plane, border, fringe, difference, or unconstrainedview; specify options for the arrow

Description

 • The arrow(u) calling sequence plots the arguments in u as arrows with their bases located at the origin.
 • The arrow(u, v) calling sequence plots at each base point in u arrows in the direction of each point in v.
 • The arrow(U) calling sequence plots each pair of points as an arrow with its base at the first point in the direction of the second point.
 • If the arguments have 2 elements, the result is a 2-D plot, whereas if the arguments have 3 elements, the result is a 3-D plot.
 • The properties of the arrow are described by using optional arguments. The opts argument can contain one or more of the following equations.
 shape =harpoon, arrow, double_arrow, or cylindrical_arrow
 This option specifies the appearance of the arrow.  The value harpoon indicates that the arrow is drawn as a line with a single line indicating the head. The value arrow indicates that the arrow is drawn as a line with two lines indicating the head. The value double_arrow indicates that the arrow is drawn as a rectangle and triangle. The value cylindrical_arrow indicates the arrow is drawn as a cylinder and cone.
 The default shape for 2- and 3-D arguments is double_arrow and cylindrical_arrow, respectively.
 Note: The value cylindrical_arrow is not valid if the plot is 2-D.
 length =len or [len, lenopts]
 The argument len is of type algebraic. The optional parameter lenopts is an equation of the form relative=truefalse that specifies whether the length of the arrow len is relative to the distance between the described endpoints, that is, the length of the arrow is the distance between the specified points multiplied by len, or is an absolute length, that is, the length of the arrow is len. The default value is false.
 If this option is not included, the arrow is plotted between the described endpoints.
 width =wid or [wid, widopts]
 The argument wid is of type algebraic. The optional parameter widopts is an equation of the form relative=truefalse that specifies whether the width wid is relative to the length of the arrow or to an absolute width.
 If this option is not included, the width is $\frac{1}{20}$ the length of the arrow.
 The argument hwid is of type algebraic. The optional parameter hwidopts is an equation of the form relative=truefalse that specifies whether the width of the head hwid is relative to the width of the arrow or to an absolute width.
 If this option is not included, the width of the head is twice the width of the arrow.
 The argument hlen is of type algebraic. The optional parameter hlenopts is an equation of the form relative=truefalse that specifies whether the length of the head hlen is relative to the length of the arrow or to an absolute length.
 If this option is not included, the length of the head is $\frac{1}{5}$ the length of the arrow.
 plane =list or Vector
 If this option is included, the resulting arrow lies in the plane containing the arrow itself and the cross product of the arrow and the plane vector.  If the plane vector and the arrow are collinear, this option is ignored. This option is relevant only for 3-D arrows with shape set to either double_arrow, harpoon, or arrow.
 border =truefalse or list
 This option applies to 2-D arrows having shape double_arrow only. If this option is set to true (the default), then a border is drawn around the arrow. If it is set to false, no border is drawn. If it is a list of plot options, then these options are applied to the border. Only options applicable to curves as described on the plot/option help page are accepted.
 difference =truefalse
 This option, if set to true with both arguments u and v, specifies that the base of the arrow is located at u and the tip of the arrow is located at v.
 The default value is false, in which case u is the location of the base of the arrow and u + v is the location of the tip of the arrow.
 fringe =truefalse, name, or function
 This option adds a "fringe" around the arrow head. It only works if shape = cylindrical_arrow.
 The default value is false. If only fringe is chosen, the default color is black. The prespecified colors for the fringes are black, white, red, green, and blue. They must be input in the form fringe = name. For example, fringe = red, produces a red fringe around the arrow head. Other colors can be specified by using the function COLOR(RGB, a, b, c) where a, b, and c are floats between 0.0 and 1.0 .
 unconstrainedview=truefalse or list
 This option applies to 2-D arrows and affects the size and angle of the arrow head.  When unconstrainedview=false, the arrow head is symmetrical with a fringe that is perpendicular to the line of the arrow.  This looks best when the scale of the x and y axes are of equal proportion, or when the plot is using the constrained option.
 When unconstrainedview=true, the arrow head is drawn with an angle that matches a possibly stretched view that happens when the x and y axes are not of equal proportion.
 When unconstrainedview=[xmin..xmax,ymin..ymax], the arrow head is drawn with an angle that matches the specified overall view.  This is especially useful when drawing many arrows in the same scene.

Examples

 > $\mathrm{with}\left(\mathrm{plots}\right):$

Plot a sequence of related arrows.

 > $\mathrm{arrow}\left(\left[\mathrm{seq}\left(⟨\mathrm{sin}\left(i\right),\mathrm{cos}\left(i\right)\mathrm{cos}\left(\frac{7}{23}i\right),\mathrm{sin}\left(\frac{7}{23}i\right)⟩,i=1..23\right)\right],\mathrm{axes}=\mathrm{frame}\right)$

Plot three points with various shapes.

 > $\mathrm{a1}≔\mathrm{arrow}\left(⟨0,0,1⟩,\mathrm{shape}=\mathrm{harpoon}\right):$
 > $\mathrm{a2}≔\mathrm{arrow}\left(⟨0,1,0⟩,\mathrm{shape}=\mathrm{arrow}\right):$
 > $\mathrm{a3}≔\mathrm{arrow}\left(⟨1,0,0⟩,\mathrm{shape}=\mathrm{double_arrow}\right):$
 > $\mathrm{a4}≔\mathrm{arrow}\left(⟨1,1,1⟩,\mathrm{shape}=\mathrm{cylindrical_arrow}\right):$
 > $\mathrm{display}\left(\mathrm{a1},\mathrm{a2},\mathrm{a3},\mathrm{a4},\mathrm{scaling}=\mathrm{constrained},\mathrm{axes}=\mathrm{frame}\right)$

Plot three points using various options.

 > $\mathrm{b1}≔\mathrm{arrow}\left(⟨1,2,3⟩,⟨3,-4,5⟩,\mathrm{width}=\left[0.2,\mathrm{relative}\right],\mathrm{head_length}=\left[0.4,\mathrm{relative}\right],\mathrm{color}=\mathrm{red}\right):$
 > $\mathrm{b2}≔\mathrm{arrow}\left(⟨1,2,3⟩,⟨3,-4,5⟩,\mathrm{difference},\mathrm{color}=\mathrm{blue}\right):$
 > $\mathrm{b3}≔\mathrm{arrow}\left(⟨1,2,3⟩,⟨-3,4,-5⟩,\mathrm{width}=0.2,\mathrm{head_length}=0.4,\mathrm{color}=\mathrm{green}\right):$
 > $\mathrm{display}\left(\mathrm{b1},\mathrm{b2},\mathrm{b3},\mathrm{scaling}=\mathrm{constrained},\mathrm{axes}=\mathrm{frame},\mathrm{lightmodel}=\mathrm{light3}\right)$
 > $\mathrm{c1}≔\mathrm{arrow}\left(⟨1,1,1⟩,\mathrm{shape}=\mathrm{cylindrical_arrow},\mathrm{fringe}\right):$
 > $\mathrm{c2}≔\mathrm{arrow}\left(⟨0,0,1⟩,\mathrm{shape}=\mathrm{cylindrical_arrow},\mathrm{fringe}='\mathrm{red}'\right):$
 > $\mathrm{c3}≔\mathrm{arrow}\left(⟨0,1,0⟩,\mathrm{shape}=\mathrm{cylindrical_arrow},\mathrm{fringe}='\mathrm{COLOR}\left(\mathrm{RGB},0.6,0.1,0.7\right)'\right):$
 > $\mathrm{display}\left(\mathrm{c1},\mathrm{c2},\mathrm{c3},\mathrm{scaling}=\mathrm{constrained},\mathrm{axes}=\mathrm{frame}\right)$

Plot a sequence of arrows of differing sizes.

 > $\mathrm{arrow}\left(\left\{\mathrm{seq}\left(⟨\mathrm{sin}\left(i\right),\mathrm{cos}\left(0.31i\right),\mathrm{sin}\left(1.033i\right)⟩,i=1..10\right)\right\},\mathrm{scaling}=\mathrm{constrained},\mathrm{axes}=\mathrm{frame}\right)$

Display the eigenvectors of a given 3x3 matrix.

 > $A≔⟨⟨-1,-3,-6⟩|⟨3,5,6⟩|⟨-3,2,-6⟩⟩:$
 > $\mathrm{vals},\mathrm{vects}≔\mathrm{LinearAlgebra}\left[\mathrm{Eigenvectors}\right]\left(A\right):$
 > $\mathrm{arrow}\left(\left\{\mathrm{seq}\left(\mathrm{vects}\left[1..-1,i\right],i=1..3\right)\right\},\mathrm{scaling}=\mathrm{constrained},\mathrm{axes}=\mathrm{frame}\right)$

Produce a directional plot for a given vector-valued function.

 > $\mathrm{arrow}\left(\left\{\mathrm{seq}\left(\mathrm{seq}\left(\left[\left[i,j\right],\left[\mathrm{exp}\left(i\right)\mathrm{sin}\left(i\right),\mathrm{exp}\left(j\right)\mathrm{cos}\left(j\right)\right]\right],i=-5..5\right),j=-5..5\right)\right\},\mathrm{length}=0.4,\mathrm{scaling}=\mathrm{constrained}\right)$

Display triads at a number of points.

 > $\mathrm{arrow}\left(\left\{\left[1,2,3\right],\left[2,-3,4\right],\left[4,0,-1\right],\left[-2,3,1\right]\right\},\left\{\left[0,0,1\right],\left[0,1,0\right],\left[1,0,0\right]\right\}\right)$

Draw 2-D arrows with and without a border.

 > $\mathrm{display}\left(\mathrm{arrow}\left(\left[1,2\right],\mathrm{color}="LightBlue"\right),\mathrm{arrow}\left(\left[2,1\right],\mathrm{color}="LightBlue",\mathrm{border}=\mathrm{false}\right)\right)$

Change the properties of a 2-D arrow's border.

 > $\mathrm{arrow}\left(\left[1,2\right],\mathrm{color}="LightBlue",\mathrm{border}=\left[\mathrm{color}="DarkBlue",\mathrm{thickness}=3\right]\right)$

These next two arrows have the same point, where the magnitude of the x and y coordinates are very different.  Note the use of the scaling=constrained or unconstrainedview=true options.

 > $\mathrm{arrow}\left(\left[1,2\right],\mathrm{scaling}=\mathrm{constrained}\right)$
 > $\mathrm{arrow}\left(\left[1,2\right],\mathrm{unconstrainedview}=\mathrm{true}\right)$

In this plot there are many arrows in the scene.  In order to have them properly drawn together the overall view of the scene is given as a parameter to each individual arrow.

 > $\mathrm{greens}≔\mathrm{ColorTools}:-\mathrm{AnalogousSpread}\left("Green",\frac{360}{10}+1\right):$
 > $\mathrm{plots}:-\mathrm{display}\left(\left\{\mathrm{seq}\left(\mathrm{plots}:-\mathrm{arrow}\left(\left[5i\mathrm{sin}\left(\frac{i\mathrm{\pi }}{180}\right),i\mathrm{cos}\left(\frac{i\mathrm{\pi }}{180}\right)\right],\mathrm{color}=\mathrm{greens}\left[\mathrm{iquo}\left(i,10\right)+1\right],\mathrm{unconstrainedview}=\left[-1400..500,-200..350\right]\right),i=1..360,10\right)\right\}\right)$

Compatibility

 • The border option was introduced in Maple 2018.