Hexagons in space: hexagon

### 14.9.1 Hexagons in space: hexagon

See Section 13.10.1 for hexagons in the plane.

The hexagon command creates hexagons in space.

- hexagon takes three mandatory arguments and four optional arguments:
  - A,B,P, four points.
  - Optionally, var1,var2,var3,var4, four variable names.
- hexagon(A,B,P ⟨,var1,var2,var3,var4⟩) returns and draws the regular hexagon ABCDEF in the plane ABP, oriented so that angle ABC is positive.

#### Examples

- Input:

  A:= point(0,0,0);
  B:= point(3,3,3);
  P:= point(0,0,3);
  hexagon(A,B,P)

  Output:
- Input:

  hexagon(A,B,P,C,D,E,F)
  simplify(coordinates(C))

  Output:

  ⎡ ⎢ ⎢ ⎣ |
  −3 | √ |
  6
  | +18
  4
  | , |
  −3 | √ |
  6
  | +18
  4
  | , |
  3 | √ |
  6
  | +9
  2
  | ⎤ ⎥ ⎥ ⎦