Euglena swims in a helix so that the stigma-photoreceptor axis sweeps through a circle, if more light comes from one direction than from the others, the Euglena turns in that direction. The cup eye can't form an image because every point on the retina receives light from many directions The pinhole eye solves this problem by admitting light through a narrow opening, so that only rays from a single direction fall at each point on the retina. The image is inverted and reversed Nautilus is the only animal with a true pinhole eye. It is a mollusc distantly related to the octopus, but with a coiled shell. The smaller the pinhole the less blurry the image, at least to a certain point.
Diffraction sets a limit on the resolving power of a pinhole eye.
Light has wave properties. When light waves pass through a small opening, they are bent outward. Thus making the pinhole smaller, beyond a certain point no longer improves the image. Because pinhole is small, very little light gets through and the image is faint, and therefore low in contrast. Each point on the retina receives light rays coming only from a single direction in space.