### 12.13.4 The coordinates of a point, vector or line in the plane: coordinates

See section 13.12.4 for coordinates in three-dimensional geometry.

The coordinates command takes as argument a point or line.

If the argument is a point, coordinates returns a list consisting of the abscissa and ordinate.

If the argument is a line, coordinates returns a list of two points on the line, in the order determined by the direction of the line.
Input:

coordinates(1+2*i)

or:

coordinates(point(1+2*i))

or:

coordinates(vector(1+2*i))

Output:

[1,2]

Input:

coordinates(point(1+2*i) - point(i))

or:

coordinates(vector(i,1+2*i))

or:

coordinates(vector(point(i),point(1+2*i)))

or:

coordinates(vector([0,1],[1,2]))

Output:

[1,1]

Input:

d := line(-1+i,1+2*i)

or:

d := line(point(-1,1),point(1,2))

Input:

coordinates(d)

Output:

[-1+i,1+2*i]

Input:

coordinates(line(y = (1/2 * x + 3/2)))

Output:

[3*i/2, 1+2*i]

Input:

coordinates(line(x - 2*y + 3 = 0))

Output:

[3*i/2, (-4 + i)/2]

coordinates can also take a sequence or list of points as an argument; it then returns a sequence or list of the coordinates of the points.
Input:

coordinates(i,1+2*i)

or:

coordinates(point(i),point(1+2*i))

Output:

[0,1], [1,2]

Note that if the argument is a list of real numbers, it is interpreted as a list of points on the real axis.
Input:

coordinates([1,2])

Output:

[[1,0],[2,0]]