Previous Up Next

13.7.4  Vectors in the plane: segment vector

See Section 14.5.4 for vectors in space.

The segment commands returns and draws vectors. (The segment command can also draw line segments, see section 13.7.3.)


Example.
Input:

segment([-1,0],[1,1])

Output:


The vector command also makes vectors, with a different syntax. It can take its arguments in different ways.

The coordinates of the vector.


Example.
Input:

vector([1,2])

Output:


Two points or a point and a vector.


Example.
Input:

vector([-1,0],[1,i])

or:

vector(-1,i)

or:

V:= vector(1,2+i):; vector(-1,V)

Output:


Previous Up Next