Take a matrix of points in 3D space, e.g.30 × 30, 30 X 30 X 3 or 4 × 4 × 4.
For each location in the matrix:
Randomly select an object to draw centred on that location.
Rotate the object randomly about its local origin before it is drawn. Draw in perspective.