# Intersection of a cube and the plane $x+y+z=0$

I know that the intersection of a cube and the plane $x+y+z=0$ is a hexagon.

To make things simple, assume we have a cube with center at $(0,0,0)$, I wish to find the (6) points of the hexagon (the cube have side length 1).

I'm having difficulty calculating this, this isn't really my field..

-
A plane can cut an arbitrary cube in various ways - I can get a square, rectangle, triangle, hexagon without any difficulty. I think I can get a pentagon too, by "taking an edge of the hexagon to one of the corners" to be informal about it. So you need to specify more than you have - orientation is important - are you assuming edges parallel to the axes? Then you need to identify the points at which your plane crosses the edges of the cube. Not so difficult, I think. –  Mark Bennet Apr 6 '12 at 18:57
@MarkBennet I have some more details: We look at the solid tesselation of cubes with centers at each integer point and the plane $x+y+z=0$ cutting it. I am intrested in determining if the side lengths are integer numbers and if the points that makes the hexagons have only integer coordinates. –  Belgi Apr 6 '12 at 19:04

All the corners of your hexagon will be on an edge of the cube, not in the middle of a face. If a cube has side length $1$ and is centered at the origin, then the twelve edges of the cube consist of those points for which two of $x$, $y$, $z$ are either $-1/2$ or $1/2$, and the third coordinate is between those two values. So for example $(1/2,1/2,0)$ is the midpoint of one of the edges. However, if two of the coordinates are $1/2$, for example if $x=y=1/2$, then that edge does not intersect the plane, since plugging them into $x+y+z = 0$, we see that $z$ is out of range. Similarly for $x=y=-1/2$, or $x=z=1/2$, etc.

So we are just looking for points with one coordinate $1/2$ and the other $-1/2$. To satisfy the plane equation, we must have the third coordinate be $0$. So the six vertices of the hexagon are $$(1/2,-1/2,0) \\ (-1/2,1/2,0) \\ (1/2,0,-1/2) \\ (-1/2,0,1/2) \\ (0,1/2,-1/2) \\ (0,1/2,-1/2)$$

-

You can find the equations of the edges by intersecting the plane with the 8 faces of the cube. To do that you simply solve the system of two equations given by $x+y+z=0$ and one of

$$x= \pm\frac{1}{2} \, \; \, y= \pm\frac{1}{2} \,;\, z= \pm\frac{1}{2} \,.$$

keep in mind that some of the lines you'll get will not actually intersect a square face of the cube, it will pass outside the cube. Then, those are not edges of your polygon.

To find the vertices of your polygon, you solve the system given by $x+y+z=0$ and a pair of distinct variables equations from:

$$x= \pm\frac{1}{2} \, \; \, y= \pm\frac{1}{2} \,;\, z= \pm\frac{1}{2} \,.$$

This is easy, pick two of $(x,y,z)$ and just them $\pm \frac{1}{2}$. If the third variable is in $(-\frac{1}{2}, \frac{1}{2})$ that's a vertex, if it is outside that interval ignore it.

-