We present a numerical model of a ground-based telescope, whose optical system incorporates an adaptive system of compensation for image distortions. The model allows us to take into account two distorting factors: misphasing of the telescope's segmented primary mirror and the atmospheric turbulence.