A dome port like the one you see above will cause light rays to diverge. In air, this effect is negligible. When underwater, this effect is extremely pronounced. This is simply due to the different refractive indexes of the materials involved.
If you look through a dome port from the inside, the diverging rays make it appear as though the light rays travelled through an imaginary point (the red dot). This imaginary point is the virtual image. It is virtual because the light ray didn't actually pass through that point, it merely appears to have.
In order to focus on a subject through a dome port, a camera system has to focus on the virtual image produced by a dome. Some lenses aren't capable of focussing close enough to put behind a dome and this is crucial to know.
This calculator is designed to be a good visual guide to understanding how dome ports produce a virtual image. It is not designed to be 100% accurate. In order to simplify the diagram and calculations, spherical aberration is not taken into account. Arbitrary angles were chosen for the incident rays produced by the object in order to reach a good compromise between visual understanding and complete accuracy. There is almost no situation where knowing the exact distance to a virtual image will help a photographer. It does however help to understand what it is and how it comes about.