1. A system for measuring distance to a target along a Z axis within a measurement range, comprising: a) at least one optical signal generator, aimed to project onto the target a signal in the form of a two-dimensional geometric figure; b) an image device aimed to capture a reflected image of the two-dimensional geometric figure; and c) an image analyzer, connected to the image device, configured to compute distance to the target from a geometric parameter of the reflected image.