The junction between any two adjacent crystals in the rock is called a grain boundary . Grain boundaries occur where crystals develop in contact with each other - here, during the cooling and crystallisation of magma to form granite. Grain boundaries also develop when minerals grow in the solid state during metamorphism. Where the crystals form an interlocking mass, as in granite or marble, they rarely have the opportunity to develop good crystal faces. By contrast, the best-formed crystals are often ones that have grown into cracks or cavities (such as a gas bubble in a lava flow). Figure 2b shows several such quartz crystals that have grown into a cavity.