An optical rangefinder is a device that uses lenses to project a small image of an object onto the sensor, which then calculates the distance to the object. It is composed of two parts - the sensor and the lens. The sensor sends out light into a scanning pattern while it scans across an area of a chosen size. This light reflects off objects in its path and enters the lens, where it bounces back to be further projected onto the sensor. The light then goes through this process one more time so that it can be processed by electronic circuitry on the sensor.