Formation of image by pinhole camera