Added generate flat world function.