Creation of a topological defect array in liquid crystals has been a notable focus in recent years, because the defect array can be utilized as precision optics, templates of self-assembled microstructures, and elastomer actuators. So far, the defect arrays are created intuitively by trial and error. Systematic rules to arrange defects into stable long-ranged arrays are in demand. A model of two-dimensional square and hexagonal defect array was developed based on previous experimental results. The model is generalized for defect crystals and quasicrystals in this research. A crystal is the periodic repetition of a unit cell. A stable defect crystal must have minimum free energy, and the arrangement of the defects must obey the topological conservation laws. By solving the Euler-Lagrange equation of the director field of a unit cell and by integrating the topological rules into the boundary conditions, the director field of a defect crystal can be easily obtained. A large variety of defect crystals and quasicrystals are derived. The lattices are rectangular, triangular, square, pentagonal, and hexagonal. The defects can be either radial or azimuthal (vortex-like). The nematic and vector orders are both considered. The collection of defect crystals is presented here as a catalog for the designers.