is shown in red. The letters indicate which layers are the same. There are two "A" layers in the HCP matrix, where all the spheres are in the same position. All three layers in the FCC stack are different. Note the FCC stacking may be converted to the HCP stacking by translation of the upper-most sphere, as shown by the dashed outline. When forming any sphere-packing lattice, the first fact to notice is that whenever two spheres touch a straight line may be drawn from the center of one sphere to the center of the other intersecting the point of contact. The distance between the centers along the shortest path namely that straight line will therefore be
r1 +
r2 where
r1 is the radius of the first sphere and
r2 is the radius of the second. In close packing all of the spheres share a common radius,
r. Therefore, two centers would simply have a distance 2
r.
Simple HCP lattice To form an A-B-A-B-... hexagonal close packing of spheres, the coordinate points of the lattice will be the spheres' centers. Suppose, the goal is to fill a box with spheres according to HCP. The box would be placed on the
x-y-z coordinate space. First form a row of spheres. The centers will all lie on a straight line. Their
x-coordinate will vary by 2
r since the distance between each center of the spheres are touching is 2
r. The
y-coordinate and z-coordinate will be the same. For simplicity, say that the balls are the first row and that their
y- and
z-coordinates are simply
r, so that their surfaces rest on the zero-planes. Coordinates of the centers of the first row will look like (2
r,
r,
r), (4
r,
r,
r), (6
r ,
r,
r), (8
r ,
r,
r), ... . Now, form the next row of spheres. Again, the centers will all lie on a straight line with
x-coordinate differences of 2
r, but there will be a shift of distance
r in the
x-direction so that the center of every sphere in this row aligns with the
x-coordinate of where two spheres touch in the first row. This allows the spheres of the new row to slide in closer to the first row until all spheres in the new row are touching two spheres of the first row. Since the new spheres
touch two spheres, their centers form an equilateral triangle with those two neighbors' centers. The side lengths are all 2
r, so the height or
y-coordinate difference between the rows is
r. Thus, this row will have the coordinates for the th center, starting from 0, of (2 + 1), + , :
(, + , ), (3, + , ), (5, + , ), ... The first sphere of this row only touches one sphere in the original row, but its location follows suit with the rest of the row. The next row follows this pattern of shifting the
x-coordinate by
r and the
y-coordinate by . Add rows until reaching the
x and
y maximum borders of the box. In an A-B-A-B-... stacking pattern, the odd numbered
planes of spheres will have exactly the same coordinates save for a pitch difference in the
z-coordinates and the even numbered
planes of spheres will share the same
x- and
y-coordinates. Both types of planes are formed using the pattern mentioned above, but the starting place for the
first row's first sphere will be different. Using the plane described precisely above as plane #1, the A plane, place a sphere on top of this plane so that it lies touching three spheres in the A-plane. The three spheres are all already touching each other, forming an equilateral triangle, and since they all touch the new sphere, the four centers form a
regular tetrahedron. All of the sides are equal to 2
r because all of the sides are formed by two spheres touching. The height of which or the
z-coordinate difference between the two "planes" is . This, combined with the offsets in the
x and
y-coordinates, gives the centers of the first row in the B plane:
(, + , + 2), (3, + , + 2), (5, + , + 2), ... The second row's coordinates follow the pattern first described above and are:
(2, + , + 2), (4, + , + 2), (6, + , + 2), ... The difference to the next plane, the A plane, is again 2 in the
z-direction and a shift in the
x and
y to match those
x- and
y-coordinates of the first A plane. In general, the coordinates of sphere centers can be written as: \begin{bmatrix} 2i + \bigl((j\ +\ k) \bmod 2\bigr)\\ \sqrt{3}j + \frac{k \bmod 2}{\sqrt3}\\ 2\sqrt{\frac{2}{3}}k\\ \end{bmatrix}r where , , and are indices starting at 0 for the
x-,
y-, and
z-coordinates. ==Miller indices==