plottools - Maple Programming Help

Home : Support : Online Help : Graphics : Packages : Plot Tools : plottools/arrow

plottools

 arrow
 generate 2-D or 3-D plot object for an arrow

 Calling Sequence arrow(base, dir, wb, wh, hh, sh, fr, brd, options) arrow(base, dir, pv, wb, wh, hh, sh, fr, brd, options)

Parameters

 base - base of the arrow, given as 2-D (or 3-D) point or 2-D (or 3-D) Vector dir - 2-D (or 3-D) point or 2-D (or 3-D) direction Vector pv - vector indicating the plane containing the arrow wb - width of the body of the arrow wh - width of the head of the arrow hh - height of the head of the arrow as a ratio of the length of the body sh - (optional) shape of the arrow, either harpoon, arrow, double_arrow, or cylindrical_arrow fr - (optional) add a "fringe" to the arrowhead, only works if shape of the arrow is cylindrical_arrow brd - (optional) add a border around the arrow, only works for 2-D arrows having shape double_arrow options - (optional) equations of the form option=value. For a complete list, see plot/options and plot3d/option.

Description

 • The arrow command creates plot data objects, which when displayed create an arrow whose base is located at base.
 Note: Multiple plot data objects may be generated, so if the result is intended to be part of animation, it may be necessary to enclose these in a PLOT or PLOT3D function.
 • If dir is a point (a list of two or three real numbers), the arrow is drawn from the point base to the point dir.
 If dir is a Vector (a Vector of dimension two or three), the output is the specified vector dir with the tail at the point base.
 • In the 3-D case, the plane vector $\mathrm{pv}=\left[a,b,c\right]$ is used to specify the plane in which the vector lies.  It lies in the plane containing the arrow and cross product of the arrow and pv.  If the direction of the arrow and the plane vector are collinear, the argument pv is ignored.
 • The wb parameter indicates the width of the body of the arrow
 • The wh parameter indicates the width of the head of the arrow
 • The hh parameter is the ratio of the height of the head of the arrow to the length of the body of the arrow.
 • The optional argument sh indicates how the arrow should be drawn, either harpoon or arrow for a one-dimensional arrow, double_arrow for a two-dimensional arrow, or cylindrical_arrow for a three-dimensional arrow.
 • The optional argument fr adds a fringe to the arrowhead. It is available only for cylindrical_arrow. The inputs must be in the form fringe = color where color can be any color specification as described in plot/color.
 • The optional argument brd adds a border around the arrow. It is available only for the 2-D double_arrow. The input must be in the form border = t where t can be true, false or a list of plot options as described in plot/options. The default value is true. If a list of options is given, then any that are applicable to 2-D curves (such as color or thickness) are applied to the border.
 • A call to arrow produces a plot data object that can be used in a PLOT or PLOT3D data structure, or displayed using the plots[display] command.
 • The remaining arguments are interpreted as options, which are specified as equations of the form option = value.  For more information, see plottools, plot/options and plot3d/option.
 • In some cases, the result is an expression sequence of plot objects, and therefore in order to group these objects, place a PLOT or PLOT3D command around the result.

Examples

 > $\mathrm{with}\left(\mathrm{plots}\right):$
 > $\mathrm{with}\left(\mathrm{plottools}\right):$
 > $\mathrm{l1}≔\mathrm{arrow}\left(\left[0,0\right],\left[10,10\right],0.2,0.4,0.1,\mathrm{color}="Green"\right):$
 > $\mathrm{l2}≔\mathrm{arrow}\left(\left[10,10\right],\mathrm{Vector}\left(\left[0,10\right]\right),0.2,0.4,0.1,\mathrm{color}="Red"\right):$
 > $\mathrm{display}\left(\mathrm{l1},\mathrm{l2},\mathrm{axes}=\mathrm{frame}\right)$ > $\mathrm{ll}≔\mathrm{arrow}\left(\left[0,0,0\right],\left[2,2,2\right],0.2,0.4,0.1\right):$
 > $\mathrm{display}\left(\mathrm{ll},\mathrm{axes}=\mathrm{frame},\mathrm{color}="Red",\mathrm{orientation}=\left[-50,60\right]\right)$ > $\mathrm{ll}≔\mathrm{arrow}\left(\mathrm{Vector}\left(\left[1,0,0\right]\right),\mathrm{Vector}\left(\left[2,2,2\right]\right),0.2,0.4,0.1,\mathrm{cylindrical_arrow},\mathrm{fringe}=\mathrm{blue},\mathrm{color}="Green"\right):$
 > $\mathrm{display}\left(\mathrm{ll},\mathrm{color}="Red",\mathrm{orientation}=\left[100,160\right]\right)$ > $\mathrm{display}\left(\mathrm{seq}\left(\mathrm{PLOT}\left(\mathrm{arrow}\left(\left[0,0\right],\left[i,10\right],0.2,0.4,0.1,\mathrm{color}="Green"\right)\right),i=1..10\right),\mathrm{insequence}=\mathrm{true}\right)$ > $\mathrm{display}\left(\mathrm{arrow}\left(\left[0,0\right],\left[10,10\right],0.3,0.5,0.1,\mathrm{color}="Green",\mathrm{border}=\mathrm{false}\right)\right)$ > $\mathrm{display}\left(\mathrm{arrow}\left(\left[0,0\right],\left[10,10\right],0.3,0.5,0.1,\mathrm{color}="Green",\mathrm{border}=\left[\mathrm{color}="Blue",\mathrm{thickness}=4\right]\right)\right)$ Compatibility

 • The plottools[arrow] command was updated in Maple 2018.
 • The border option was introduced in Maple 2018.