This function does a good bit of position-munging, but it all boils down to a simple idea: Keep constant the precise distance between the mouse cursor and the targetobject.
Said proximity corresponds to a distance (relative position) between the targetobject (2) and the reference object (6, 8) wherein the reference object is located substantially at the focal plane.
On the NCI chip, the phase, frequency, andintensity of the reflected light from different points on the object isdetected and used to determine the exact distance of the target point.