# Translation in space: translation

### 14.14.2 Translation in space: translation

See Section 13.15.2 for translations in the plane.

The translation command creates a translation.

- translation takes one mandatory argument and one optional argument:
  - v, the translation vector, which can be given as a vector or a list of coordinates.
  - Optionally, G, a geometric object.
- translation(v) returns a new command which translates by v.
- translation(v,G) returns and draws the translation G by the vector v.

#### Examples.

- Input:

  t:= translation([1,1,1])
  S:= sphere([0,0,0],0.5)
  color(S,blue),t(S)

  Output:
- Input:
  translation([1,1,1],S)
  Output: