In theory, one could calculate the optimum solution but this would require detailed knowledge of the physics and optics of the components so the practical approach of adjusting both variables to find a working solution was used and only took a week.
We initially thought that aligning the camera and the display in parallel would mean that there would be no Moiré patterns but actually the best angle is 45 degrees. Combined with the optimal distance between the camera and the display and the Moiré pattern disappears.
As a result, the automatic testing now only takes a couple of seconds per unit and is highly reliable as the human element is removed. Removing the cost of the human element is also important, as several people would have been required on a rotation basis to avoid eye fatigue.
Fig. 2: Rotating by 45 degees removes Moiré patterns.