An array of spatially distributed LEDs can produce a desired illumination pattern by individually modulating each LED. A target image can be the desired lighting pattern so that the software could find the best solution to match it. Given a desired illuminance distribution on a target surface, the luminous flux of each single LED that most closely matches the desired distribution must be determined. We review a constrained least squares method for this problem. We show how the quality of the rendering depends on the number of LEDs, array-target distance, and the size of the illuminated area. In particular, as we observed, there is an optimum illumination distance, which is proportional to the square root of the target size and varies inversely with a power of the number of LEDs.© (2008) COPYRIGHT SPIE--The International Society for Optical Engineering. Downloading of the abstract is permitted for personal use only.