Hexagons in space

### 27.8.1 Hexagons in space

See Section 26.9.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

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

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

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