Previous Up Next

12.10.1  Regular hexagons in the plane: hexagon

See section 13.9.1 for hexagons in space.

The hexagon command takes two mandatory arguments and up to four optional arguments. The two mandatory arguments points A and B.

hexagon returns and draws the regular hexagon ABCDEF, where the vertices are counterclockwise.
Input:

hexagon(0,1)

Output:

The optional arguments will need to be variable names, which will be assigned in order to vertices C through F.
Input:

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

Output:

Input:

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

Output:

3/2 + i*sqrt(3)/2, 1 + i*sqrt(3), i*sqrt(3), -1/2 + i*sqrt(3)/2

Previous Up Next