If your central point is $(c_x,c_y)$ and you want to rotate counter-clockwise about this point by an angle of $\theta$ (in radians) you would shift the center to the origin (and the rest of the points of the plane with it), then rotate, then shift back. You can use:
$x_{\text{rot}}=\cos(\theta)\cdot(x-c_x)-\sin(\theta)\cdot(y-c_y)+c_x$
$y_{\text{rot}}=\sin(\theta)\cdot(x-c_x)+\cos(\theta)\cdot(y-c_y)+c_y$
$(x,y)$ are your initial coordinates and $(x_\text{rot},y_{\text{rot}})$ are the new coordinates after rotation by $\theta$ about $(c_x,c_y)$
Example: If you want to rotate the point $(3,0)$ by $90^{\circ}$=$\frac{\pi}{2}$ radians about the point $(3,2)$ the formula should give $(5,2)$. Computing to check:
$x_{\text{rot}}=\cos(\frac{\pi}{2})\cdot(3-3)-\sin(\frac{\pi}{2})\cdot(0-2)+3=5$
$y_{\text{rot}}=\sin(\frac{\pi}{2})\cdot(3-3)+\cos(\frac{\pi}{2})\cdot(0-2)+2=2$
You can't do what you are hoping because you can't cover a sphere with squares. In fact, you can't even put one square on the sphere. If you look closely, the angles of your squares add up to more than $360^\circ$, by an amount that is determined by the solid angle taken up by the square.
A few choices that maintain some of what you want. 1) The black grid in your first figure comes from the classic lines of latitude and longitude. You get quadrilaterals except near the poles. You can choose what latitude to make the cells almost square, but they will be much larger near the equator than near the poles. 2) Use the latitude/longitude lines as in 1, but have fewer cells as you get near the poles. You can keep the cells close to square, but won't have a nice grid. 3) Use the square grid as you are, but recognize that you can't have one grid that covers the sphere. Maybe a grid that covers about half the sphere centered on a point of current interest meets your needs.
Best Answer
Your question really has nothing to do with “rectangles”, which @MPW has already pointed out don’t exist on a sphere. There is a way of looking at your problem that makes it an exercise in basic spherical trigonometry, and I’ll show you that. I do not make any claim that it’s the fastest way of getting your problem solved, though.
You have a point, let’s say $R$, on the sphere, let’s say it’s Richmond, and you want to rotate it about a fixed point $O$, let’s say that’s Orono. And your motion is a “rotation” in this sense: you have the “heading” $\alpha$ from $O$ to $R$, that is the compass-direction that you start out in if you’re going in a great-circle path. And you have the distance $d$ from $O$ to $R$. Your rotation asks for the location that you’ll get to if you go a distance of $d$ with an original heading of $\alpha+\delta$, where $\delta$ is the angle that you’re rotating things.
Now let’s draw a picture, you’ll have to do the drawing yourself. Knowing the latitude and longitude of Richmond and Orono, you see that there’s a triangle with vertex way up at the north pole $P$. The distance from $P$ to $O$ is Orono’s colatitude, that’s just the complement of Orono’s latitude. I’ll call this $c_O$. Similarly, you have the colatitude of Richmond, I’ll call this $c_R$. So you see that you have a triangle $RPO$ with legs $c_R$ and $c_O$, and up at the pole, the angle is the difference between the two cities’ longitudes. I’ll call this $\lambda$, to keep Greek letters for vertex angles and Latin lower-case for lengths of sides, capital letters for points on the sphere.
So you see that you have a SAS situation, and just as in plane trigonometry your first tool to use is Law of Cosines, to get the third side of your triangle, that’s the distance from $O$ to $R$, which I’ve called $d$. Then there’s also a spherical Law of Sines for getting the vertex angle $\alpha$ at $O=\,$Orono. The general Laws of Cosines and Sines are $$ \cos c=\cos a\cos b+\sin a\sin b\cos\gamma\,, $$ for Cosines, where $\gamma$ is the angle opposite the side of length $c$. And for the Law of Sines, $$ \frac{\sin a}{\sin\alpha}=\frac{\sin b}{\sin\beta}=\frac{\sin c}{\sin\gamma}\,, $$ where I’m sure you’ve guessed that $\beta$ is to be the angle opposite the side $b$ and $\alpha$ is the angle opposite the side $a$.
Now for our setup of rotating Richmond about the center Orono: We have our two legs $c_R$ and $c_O$ and our longitude-difference $\lambda$, so we get $$ \cos d = \cos c_R\cos c_O + \sin c_R\sin c_O\cos\lambda\,. $$ Now, with $d$ and $\lambda$ in hand, a side-and-opposite-angle pair, you can use Sines to get $\alpha$. Now add your rotation-angle $\delta$ to get $\alpha'=\alpha+\delta$, and to find your Richmond$'$, you use the triangle $POR'$, where $PO$ is still $c_O$, and $OR'$ is still $d$, but the known vertex angle now is at $O$, and it’s $\alpha'$. You see that it’s quite a megillah, but certainly very easily programmed.