Below is my metacode for iterating through a grid of images to render the vegetation surface model from povray. The real code will be implemented in BASH and AWK, although this would be a perfect use of Python, if I knew how to use it… .
cuy_veg_points: Load veg points into database and make 2D geometry
cuy_terrain_points: Load terrain points into database and make 2D geometry
cuy_veg_height: Use nearest neighbor to calculate tree height into veg point database
cuy_tile_centroids: Generate tile centroids and load into table– contains coordinates and record area name
Read cuy_tile_centroids For each centroid record, query view extent for cuy_veg_height output temporary tree_coords.inc write worldfile for image output from povray write povray file with camera position at centroid render povray file