Number of atoms in hexagonal close-packed (HCP) unit cell Whenever the atomic packing factor for the hexagonal close-packed (HCP) crystal structure is discussed, such as in this wikipedia article, it is stated that the (effective) number $N$ of atoms in a unit cell (chosen as a hexagonal prism) is $6$ -- corner atoms contribute $1/6$ each, face-centred atoms contribute $1/2$ each, and middle-layer atoms contribute $1$ each.  So $N = 12 \times 1/6 + 2 \times 1/2 + 3 \times 1 = 6$.
However, to me it seems that the middle-layer atoms are not fully contained in the unit cell, which would mean $N < 6$. Divide the unit cell into six triangular prisms.  Then any middle-layer atom $A$ lies at the center of one of these prisms $P$.  But the radius of a cylinder inscribed in $P$ is $a/2\sqrt{3} = r/\sqrt{3} < r$ (using the notation from the wikipedia page), so $A$ cannot fit inside $P$.  So $A$ is not fully contained within the unit cell.
Can somebody explain why this objection is incorrect?
 A: I hope this picture makes clearer both the question and the answers above.

A: It can be viewed as a combination of three unit cells with one particle each at the corners and one partially inside so that total number of particle = (1/12x 4 +1/6 x 4 ) + 1 = 2
Because 4 corners share 12 such unit cells and other 4 corners share 6 such unit cells;1 is effectively inside it since the cut offs are compensated by cut ins. So in a hexagonal prism 2 x 3 = 6 is the effective no. of particles. But it is not a combination of three premitive Bravais lattice of hexagonal crystal system.
A: The hexagonal prism consists of three unit cells. And there are 6 atoms in the middle layer of hexagonal prism, however 3 of those atoms have a larger section of their volumes inside the HCP Unit Cell, where as other 3 atoms have a smaller section ( Complete volume of their spheres - The "larger" section of their volumes ).
Adding the volumes of these 6 atoms, gives a volume that is equivalent to that of 3 full atoms.
Hope this helps.
