Given an azimuth & altitude, a number of random objects, and a ground, the script casts rays from a number of points on the grid and calculates whether a point receives sunlight or shadow.

azimuth 90

altitude 60