### 26.9.1 Regular hexagons in the plane

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

hexagon(0,1)

hexagon(0,1,C,D,E,F)

affix(C), affix(D), affix(E), affix(F)

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