Formation of quasicrystals