  Gravitational collapse of a massless scalar field with the periodic boundary
condition in a cubic box is reported. This system can be regarded as a lattice
universe model. We construct the initial data for a Gaussian like profile of
the scalar field taking the integrability condition associated with the
periodic boundary condition into account. For a large initial amplitude, a
black hole is formed after a certain period of time. While the scalar field
spreads out in the whole region for a small initial amplitude. It is shown that
the expansion law in a late time approaches to that of the radiation dominated
universe and the matter dominated universe for the small and large initial
amplitude cases, respectively. For the large initial amplitude case, the
horizon is initially a past outer trapping horizon, whose area decreases with
time, and after a certain period of time, it turns to a future outer trapping
horizon with the increasing area.
