When light travels through a medium with a changing refractive index, it gets bent towards its higher values. This can produce upside down "mirror" images of a scenery in deserts, over heated roads or above bodies of water. We implemented a computer program, which simulates mirages above water using the method of ray tracing. We built a model for the temperature profile based on measurement data, from which we calculated the refractive index of air using another model. Rays of light are traced by solving the eikonal equation using different Runge-Kutta methods. Given a picture, a physical setup and a value for both the temperature of the water body and that of the ambient air sufficiently far from the surface (where it can be considered constant), our program can realistically reproduce images of photographed mirages. It is capable of simulating the "mirrored" pictures of objects on a wide range of distances, from practically zero to tens of kilometres (the curvature of Earth was also taken into account). We made a comparison between a real photographed mirage and a simulated one for the exact same location at Lake Balaton. In our example the distance between the observer and the scenery was 16774m with water temperature equalling 5°C and ambient temperature 1°C. Our program reproduced the mirage nicely.