Optimization of spatial light distribution through genetic algorithms for vision systems applied to quality control