added diamond algorithm for non-random terrain