Hexagons in space: hexagon

### 13.9.1 Hexagons in space: hexagon

See section 12.10.1 for hexagons in the plane.

The hexagon command takes as arguments three points, A, B and P.

hexagon returns and draws a regular hexagon. The first two points A and B are vertices of the hexagon, the third point P determines the plane and orientation of the rectangle.
Input:

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

then:

hexagon(A,B,P)

Output:

hexagon takes four optional arguments, which are variables assigned to the unnamed vertices.
Input:

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

then:

simplify(coordinates(C))

Output:

[(-3*sqrt(6)+18)/4,(-3*sqrt(6)+18)/4,(3*sqrt(6)+9)/2]