In recent years, many research and development projects have focused on the study of fiber Bragg gratings. Fiber Bragg gratings have been used in the field of sensors, lasers and communications systems. The coupled-mode theory is a suitable tool for analysis and for obtaining quantitative information about the spectrum of a fiber Bragg grating. The transfer matrix can be used to solve non-uniform fiber Bragg gratings. Uniform, chirped, sampled Bragg gratings have already been simulated by using the direct numerical integration method and the transfer matrix method. Many of the applications for optical fibers in an in vivo setting, i.e., applied to the living human body. Using optical fibers for in vivo sensing is at a far less mature stage of evolution but nevertheless shows great promise for the provision of quantitative, minimally-invasive diagnostic information. There are few light-based systems sufficiently sensitive to detect the weak reflections typically present in biological and biomedical imaging and distance measurement applications. There are a number of interesting and potentially very beneficial applications of a biomedical instrument allowing quantitative surface profiling of larger internal hollow tube organs in living humans. Long period gratings, also known as transmission gratings, are periodic structures, in which coupling occurs between modes traveling in the same direction. Long period Bragg gratings are of interest to optical researchers for their higher sensitivity to sensing and some other applications. The reflected and transmitted spectra and time delay of fiber Bragg gratings can be obtained by using this simulation program. At the same time, the maximum reflectivity, and centre wavelength can also be obtained. Object-oriented programming (OOP) techniques are widely used for their advantages in the simulation software field.