Defects in liquid crystals are of great practical importance and theoretical interest. Despite tremendous efforts, predicting the location and transition of defects under various topological constraint and external field remains to be a challenge. We investigate defect patterns of nematic liquid crystals confined in three-dimensional spherical droplet and two-dimensional disk under different boundary conditions, within the Landau-de Gennes model. We implement a spectral method that numerically solves the Landau-de Gennes model with high accuracy, which allows us to study the detailed static structure of defects. We observe five types of defect structures. Among them the 1/2-disclination lines are the most stable structure at low temperature. Inspired by numerical results, we obtain the profile of disclination lines analytically. Moreover, the connection and difference between defect patterns under the Landau-de Gennes model and the Oseen-Frank model are discussed. Finally, three conjectures are made to summarize some important characteristics of defects in the Landau-de Gennes theory. This work is a continuing effort to deepen our understanding on defect patterns in nematic liquid crystals.