Previous Up Next

24.6.4  Vectors in the plane

See Section 25.4.4 for vectors in space.

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

Example

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

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

  1. The coordinates of the vector.
  2. Two points or a point and a vector.

Examples

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

or:

vector(-1,i)

or:

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

Previous Up Next