Lidar is the short form of light detection and ranging. The first application of a lidar system was, as in the radar technique, the determination of the distance to large-sized particles (target recognition). Nowadays, it is of more interest to measure the structure of the atmosphere in far distances (remote sensing) to get, for example, information about the mass concentration of the industrial pollution or the visibility conditions in dense fog. In this case the action and reaction of the laser light with the particles is made by very small and different scatterers (molecules, atoms, or aerosols) and, therefore, extremely complex. A simulation program that helps to determine the visibility with a lidar has been developed to present the effects of the components of the system (laser, transmitter, receiver) as well as the parameters of the atmosphere (inhomogeneities, fog, clouds) in a convenient way. A change in any parameter is taken into account instantaneously, so this program can be called an almost real time simulator. A computer with a graphic user interface was chosen to realize this as simply as possible: The Commodore Amiga. The simulation is written in `C' to get the best performance for the calculations.