angleOrderIndexes2d function

Make indexes to order grid by angles in given dimensions.