We will present the results of Monte Carlo simulations of nematic liquid crystals described by Lebwohl-Lasher-Rapini model. Detailed information on local order makes possible a calculation of diffractive index in case of inhomogeneous NLC order due to inhomogeneous electric field on the surface, resulting from laser illumination. The chess-box type of order will be discussed. A new phase diagram in variables external field-anchoring force will be discussed. The method for calculation of diffraction efficiency in an external modulated electric field will be discussed. Some applications to twisted NLC cell will be presented. Further possibilities of the approach will be discussed.