The segment and vector commands return and draw vectors. (The segment command can also draw line segments, see section 11.7.3.)
segment takes as arguments a point and a vector. The point indicates the beginning of the result and the vector (given as a list of coordinates) the direction.
segment returns and draws the corresponding vector as a line
segment. If the arguments are P and V, then command
draws the segment from P to P+V.
Input:
Output:
vector takes as arguments two points (or a list with two points) or a point and a vector.
vector returns and draws the corresponding vector. If the
arguments are two points, the vector goes from the first
to the second point; if the arguments are a point and a vector, then
the vector starts at the given point.
Input:
or:
or:
Output: