Rotation of a square/rectangle around a point this is the first time I ask a question here. I want to know what's the simplest way of calculating the coordinates for the 4 points of a square/rectangle on a plane, after a rotation around a point, given an angle.
Example of the rotation of a square.

Thanks in advance.
 A: Apply a rotation matrix. After rotation by an angle $\theta$, the coordinates of a point $(x,y)$ are
$$\pmatrix{\cos\theta&-\sin\theta\\\sin\theta&\cos\theta}\pmatrix{x\\y}=\pmatrix{x\cos\theta-y\sin\theta\\x\sin\theta+y\cos\theta}.$$
Now compute that for the points of interest. For example, if the square is centered on $(R,0)$ and its side length is $2r$, then the upper left corner is at $(R-r, r)$.
A: $$ (x,y)= a ( \cos \theta, \sin \theta) + \frac{b}{\sqrt2} [ (\cos(2k-1)\pi/4+ \theta), (\sin(2k-1)\pi/4+ \theta)] $$
where $a,b$ are circle radius and side of square respectively, $k=(1,4,1)$.
A: Are you familiar with the equations for polar form: $r\cos\theta = x$ and $r\sin\theta = y$? These formulas will help you here. 
Given a square, you can find the distance from any vertex to the origin ($r$) using Pythagorean theorem. You will know $x$ and $y$ because of the graph. Then, it's a matter of finding $\theta$. 
Once this is done, all rotations are simply a matter of adding degrees to $\theta$. If you want to find the coordinates in Cartesian again, then simply use the above transformation equations.
