Quasicrystals have attracted a growing interest in material science because of their unique properties and applications. Proper determination of the atomic structure is important in designing a useful application of these materials, for which a difficult phase problem of the structure factor must be solved. Diffraction patterns of quasicrystals consist of a periodic series of peaks, which can be reduced to a single envelope. Knowing the distribution of the diffraction image into series, it is possible to recover information about the phase of the structure factor without using time-consuming iterative methods. By the inverse Fourier transform, the structure factor can be obtained (enclosed in the shape of the average unit cell, or atomic surface) directly from the diffraction patterns. The method based on envelope function analysis was discussed in detail for a model 1D (Fibonacci chain) and 2D (Penrose tiling) quasicrystal. First attempts to apply this technique to a real Al-Cu-Rh decagonal quasicrystal were also made.