I meant that I still did not understand your problem. A wait inside a loop is certainly very slow and definitely not a good idea, especially for mesh manipulation. Just check out the examples. Nowhere is a wait in a loop. I'm sure you can modify them easily for reading the heights from your heightmap image.