In one embodiment, a method for calculating a distance to an object includes projecting a plurality of beams simultaneously from a light source, wherein the plurality of beams causes a plurality of lines of dots to be projected onto the object, and wherein the plurality of lines of dots are orientated parallel to each other, capturing an image of a field of view, wherein the object is visible in the image and the plurality of lines of dots is also visible in the image, and calculating the distance to the object using information in the image.