Regular hexagons in the plane: hexagon

### 13.10.1 Regular hexagons in the plane: hexagon

See Section 14.9.1 for hexagons in space.

The hexagon command creates hexagons.

- hexagon takes two mandatory arguments and four optional arguments:
  - A,B, two points.
  - Optionally, varc, vard, vare, varf, variable names.
- hexagon(A,B,C ⟨varc,vard,vare⟩) returns and draws the regular hexagon ABCDEF, where the vertices are counterclockwise.
  If the arguments varc,vard,vare,varf are given, then the points C,D,E and F will be assigned to them.

Examples.

- Input:
  hexagon(0,1)
  Output:
- Input:
  hexagon(0, 1, C, D, E, F)
  Output:
  Input:
  affix(C), affix(D), affix(E), affix(F)
  Output:

  √ |
  3
  | i+1
  2
  | +1, |
  2
  2
  |  | ⎛ ⎜ ⎝ | √ |
  3
  | i+1 | ⎞ ⎟ ⎠ | , |
  2
  2
  |  | ⎛ ⎜ ⎝ | √ |
  3
  | i+1 | ⎞ ⎟ ⎠ | −1, |
  √ |
  3
  | i+1
  2
  | −1