Intereting Posts

Book on the Rigorous Foundations of Mathematics- Logic and Set Theory
How to find $\lim_{(x,y)\rightarrow (0,0)} \frac{\sin(x\cdot y)}{x}$?
Books on module theory for linear algebra
Integral closure $\tilde{A}$ is flat over $A$, then $A$ is integrally closed
$\operatorname{Ext}$ and injectives, respectively projectives
Probability of iid random variables to be equal?
How to find out which number is larger without a calculator?
Truth of $x^2-2=0$
Show that every group $G$ of order $175$ is abelian and list all isomorphism types of these groups
The limit of $f(x,y)= \dfrac {x^2 y}{x^2 + y^2}$ as $ (x,y) \to (0,0)$
Is it true that the Fibonacci sequence has the remainders when divided by 3 repeating?
How can I solve this question on Quadratic Equations and Arithmetic Progression?
Live Variables in Context Free Grammar
Finding the Fourier transform of $f(x) = \frac{a}{\pi} \frac{1}{a^2 + x^2}$ with the residue theorem
Field Extension Notation

I am programming a $2D$ game, and I have noticed I am having trouble getting the position $(X, Y)$ of a rectangle’s corner, when such rectangle is rotated. The position I am seeking is absolute in the $2D$ space.

- Calculating the area of an irregular polygon
- How should I think about what it means for a manifold to be orientable?
- Maximizing the number of points covered by a circular disk of fixed radius.
- Centroid of equilateral triangle
- What's behind the Banach-Tarski paradox?
- Two circumcircles of triangles defined relative to a fixed acute triangle are tangent to each other (IMO 2015)

As you can see, I need help finding the correct formula to find the bottom-right corner of my rectangle when it is rotated. Given the rectangle’s dimensions are $100\times 50$, and it has been rotated by degrees.

Also, the $Y$ position in this language is increased the lower the point is. Basically, the top of the screen is $Y=0$ and the bottom is $Y=600$

Thank you.

- Why does the amoeba shrink to its skeleton when we go to infinity?
- How to find the maximum diagonal length inside a dodecahedron?
- Shortest distance between two moving points
- How to calculate true lengths from perspective projection?
- On nonintersecting loxodromes
- Which algorithm partitions the surface of a sphere in a meaningful way?
- Finding the no. of possible right angled triangle.
- Least sum of distances

The idea is to first translate your coordinates to a new coordinate system such that the origin is at $(0,0)$ (subtract $(0,50)$ from all your original coordinates), perform the rotation, and then translate back.

So, in this new coordinate system, the bottom of your rectangle has endpoints at $(0,0)$ and $(100,0)$. You can then use a(n anticlockwise) rotation matrix to transform the point $(100,0)$ to its rotated image:

$$\begin{align*}100\cos45^\circ-0\sin45^\circ&=50\sqrt{2}\\100\sin45^\circ+0\cos45^\circ&=50\sqrt{2}\end{align*}$$

and then undo the translation you made before rotating, which yields the point $(50\sqrt{2},50+50\sqrt{2})$ as the coordinates for the upper left corner in its new position.

- Reasoning behind the cross products used to find area
- What is the simplest way to show that $\cos(r \pi)$ is irrational if $r$ is rational and $r \in (0,1/2)\setminus\{1/3\}$?
- How do we take second order of total differential?
- Why are the solutions of polynomial equations so unconstrained over the quaternions?
- $f: \mathbb{R} \to \mathbb{R}$ that takes each value in $\mathbb{R}$ twice
- Prove the map has a fixed point
- Finding number of functions from a set to itself such that $f(f(x)) = x$
- ordered triplets of integer $(x,y,z)$ in $z!=x!+y!$
- Volume form on $(n-1)$-sphere $S^{n-1}$
- Is associative binary operator closed on this subset?
- The $n$-th derivative of the reciprocal of a function and a binomial identity
- How to build a function that gives recent years higher weight?
- How to move from a right semigroup action to a left semigroup action?
- Is an ideal which is maximal with respect to the property that it consists of zero divisors necessarily prime?
- Triangle Inequality $\sum_{\text{cyc}}\frac{a}{b+c}<2$