### 13.17.2 Centered cubes: centered_cube

The centered_cube command takes as arguments three points, A, B and C.

centered_cube returns and draws the cube centered at A which has B as a vertex and ABC as a plane of symmetry. This plane of symmetry has an edge of the cube containing B, the other endpoint of this edge is on the same side of line AB as C is.
Input:

centered_cube([0,0,0],[3,3,3],[0,1,0])

Output:

Input:

centered_cube([0,0,0],[3,3,3],[0,-1,0])

Output:

Note that there are two cubes centered at A, with a vertex at B and with a plane of symmetry ABC. Each cube has an edge containing B that’s contained in plane of symmetry, these edges are on opposite sides of the line AB. The cube that cube returns is the cube whose edge is on the same side of AB as the point C.