From Citizendium, the Citizens' Compendium
The eye is an organ that is capable of spatial vision, meaning it is able to detect an image. The quality of the image range greatly in quality across the animal kingdom. The pit eye of the planarian flatworm, for instance, has some ability to detect differences in intensity, resulting in a extremely blurry monochromatic image. The eye of an eagle, by contrast, can detect differences in wavelength (color) as well as intensity at incredible resolution (detail). While the eye may seem common, it is by no means a universal organ in the animal kingdom. Of the approximately 30 animal phyla, only about a third have eyes. Another third have no way of detecting light at all, and the last third have organs which can detect the presence of light. These are not considered real eyes because they do not produce an image. An earthworm, for instance, has light sensitive spots that allow it to detect whether it is above or below ground. While flies have true eyes, fly larvae do not; instead, they have a cluster of photoreceptors backed by a pigment molecule which prevents the light from coming in from the back. The larvae wave their heads around, and if they detect a higher intensity light than in the direction they are moving, they will align their bodies away from the brighter light. This tendency is called negative phototaxis.
Types of Eyes
Simple eyes are eyes which have one or no lenses. They range in complexity from the indeed very simple eye of the limpet Patella, which has a V-shaped pit of photoreceptors and a 90 degree acceptance angle, to the comparatively complex mammalian eye, which has the additional structures of the lens and cornea to help focus the image. The pit eye structure of the limpet occurs primarily in aquatic organisms and is relatively common in the more primitive phyla. In the gastropod, the structure of the eyes is somewhat different; instead of a V shape, the mouth of the pit is narrowed, and the photoreceptors line a more spherical area, reducing the acceptance angle of each photoreceptor to 10 degrees, working much like a pin-hole camera. This improves the quality of the image, but of course there is a limit to how well the eye works, as a reduction in the size of the aperture also reduces the amount of light coming in. Most of these types of eyes are relatively very small, generally less than a millimeter in diameter; the one exception is the pin-hole eye of the Nautilus which are nearly a centimeter across, much like lensed aquatic eyes.
Because of the limit of this approach, most organism have developed lenses-- material placed in front of the eye which has a higher refractive index, meaning the image can be better focused without the loss of photons inherent in reducing the aperture. When organisms moved to land, the lens was no longer sufficient, and an additional focusing device, the cornea, was evolved.
Compound eyes are eyes which have multiple lenses, such as the multi-faceted eye of most insects. There are two types of compound eyes: apposition compound eyes, which are found primarily in diurnal insects, and superposition eyes, which are present mostly in nocturnal insects and deep-water crustaceans. While these two types of eyes look the same from the outside, their internal mechanics are completely different. Apposition compound eyes consist of many eye-like segments, called ommatidia, which each have their own small retina-like structure called the rhabdom. Each of these tiny low resolution images is combined into one image post-eye. In the superposition eye, the light from each of these tiny lenses is focused on the same large photosensitive retina; the image formed on the retina is essentially the final image. Even more strangely, the image formed on the retina is not inverted. In simple eyes which contain lenses, the image is always inverted on the retina; in the apposition compound eye, each miniature image is also inverted.