Rock microstructure intrusions are a result of uninterrupted slow cooling. When a rock cools too quickly the liquid freezes into a solid glass, or crystalline groundmass. Often vapor loss from a magma chamber will cause a porphyritic texture. "Embayments" or 'corroded' margins to phenocrysts infer that they were being resorbed by the magma and may imply addition of fresh, hotter magma. Ostwald ripening is also used to explain some porphyritic igneous textures, especially orthoclase megacrystic granites. A crystal growing in a magma adopts a habit (see crystallography) which best reflects its environment and cooling rate. The usual phenocryst habit is the ones
Volcanism rapidly it cools. Magma that reaches the surface to become lava cools rapidly, resulting in rocks with small crystals such as basalt. Some of this magma may cool extremely rapidly and will form volcanic glass (rocks without crystals) such as obsidian. Magma trapped below ground in thin intrusions cools more slowly than exposed magma and produces rocks with medium-sized crystals. Magma that remains trapped in large quantities below ground cools most slowly resulting in rocks with larger crystals, such as granite and gabbro. Existing rocks that come into contact with magma may be melted and assimilated into the magma. Other