I've come across a mathematical problem, which I can't seem to solve with my limited geometry and trigonometry knowledge or by help of Wikipedia.
I need to know the coordinate points of each corner and all I know is the origin (x=3, y=4, refers to the center), the width (2.5), the height(5.0) and the rotation angle (36.87).
Any help? This seems like it should be easy, but it is really stumping me.
You have four vectors pointing from the center to each corner: $a, b, c$ and $d$, pointing to the upper right, upper left, lower left, and lower right corners respectively.
Let's rotate the vectors first, then shift them to the origin. Basically, we first pretend that the origin is $(0,0)^T$, then we slide the rectangle over.
The first vector, $a'$ is just $(\frac12 w, \frac12 h)^T$, where $w$ is the width and $h$ is the height.
The second, $b'$ is $(-\frac12 w, \frac12 h)^T$. Similarly, $c' = (-\frac12 w, -\frac12 h)^T, d' = (\frac12 w, -\frac12 h)^T$.
This is simply because we start at the origin, take a half step up and right to get to $a'$. From the origin to get to $b'$, we take a half step left and up, and so on.
Now, to compute the coordinates after rotation, simply apply the rotation matrix $R = \begin{pmatrix} \cos \theta & -\sin \theta \\ \sin \theta & \cos \theta\end{pmatrix}$ to each vector by matrix-vector multiplication. $\theta$, of course is your angle.
Finally, we add the origin $(3,4)^T$ to translate the rectangle.
So your final vectors are
$$a = Ra'+(3,4)^T, b=Rb'(3,4)^T, c=Rc'(3,4)^T, d=Rd'(3,4)^T.$$
I'll let you plug in numbers.