Something that will make you think.
I failed math, so.. I wont be much help.
But you'll have to find the middle spot which would be
256 down, 256 over.
Then 0 degrees as your starting point to 359, x's 256. But there's going to be more to it.. because some of the pixels closer to the middle are going to share the same properties.
I think that's like an (xi,yi) math equation or even (x-a)^2 + (y-b)^2 = r ^ 2
Sorry I'm not much help.
Good luck, sorry I am not much help.