## `plot::vector` -- graphical object for vectors

#### Introduction

`plot::vector``(p1, p2)` returns a polygon consisting of three lines. Theses lines are connecting the points p1 with p2 and the endpoints of the arrow with the point p2.

#### Call(s)

`plot::vector(p1, p2, angle, l <, option1, option2...>)`

#### Parameters

`p1, p2` | - | points with real valued coordinates, i.e., objects of the domain type `plot::Point` or lists of two or three real numerical values, respectively
`angle, l` | - | real numerical values
`option1, option2, ...` | - | plot option(s) of the form `option = value`

#### Returns

a graphical object of the domain type `plot::Polygon`.

#### Related Functions

`plot`, `plot2d`, `plot3d`, `plot::Polygon`

#### Details

- `angle` specifies the angle (in radian measure) between the line and the arrow.
- `l` specifies the length of the arrow.
- Use the function `plot` to display the result on the screen.
- The plot options `option1`, `option2`... must be valid plot options for two- or three-dimensional graphical objects, respectively. See `plot2d` and `plot3d` for details.

  Note that scene options are not allowed! You may give scene options as optional arguments for the function `plot`, or use `plot::Scene` to create an object representing a graphical scene.

#### Example 1

We define a vector starting at (1;2) and ending at (3;-1):

    >> v := plot::vector([1, 2], [3, -1], 0.2, 0.1)

                                  plot::Polygon()

The lenght of the arrow is 0.1, and the angle between the line and the arrow is 0.2 (in radian measure).

To plot this vector, call `plot`:

    >> plot(v)

To change the color of the vector from the previous example, enter:

    >> v::Color := RGB::Blue: plot(v, Axes = None)

Here the scene option `Axes = None` was given.

#### Changes

- new function

Do you have questions or comments?
Copyright © SciFace Software GmbH & Co. KG 2000