In reply to Leonid Batkhan.

Leonid,
Great, thanks!
The second problem now looks as it is quite easy to solve by me. But perhaps I did not explain the first problem clearly enough. I have historic data for the polygon. Based on the data one could see how the polygon (because the location of polygon's vertices depend on one of the variables changing over time) is expanding and shrinking. So it is not a question of rerunning the code on my schedule, but rather making a kind of a movie, something animated which is based on already collected data.
Regards,
Tomasz