User:Criptych/math

Rotate (x, y) around origin by &alpha;
$$ \begin{align} \text {Definitions:} \\ sin \theta&=\frac{y}{r} \\ cos \theta&=\frac{x}{r} \\ tan \theta&=\frac{y}{x} \\ sin(\theta+\alpha)&=sin\theta\cdot cos\alpha + cos\theta\cdot sin\alpha \\ cos(\theta+\alpha)&=cos\theta\cdot cos\alpha - sin\theta\cdot sin\alpha \\ \\ \text {Proof:} \\ r&=\sqrt{x^2+y^2} \\ \theta&=tan^{-1}\frac{y}{x} \\

x'&=r\cdot cos (\theta+\alpha) \\ &=r (cos\theta\cdot cos\alpha - sin\theta\cdot sin\alpha) \\ &=r (\frac{x}{r}cos\alpha - \frac{y}{r}sin\alpha) \\ &=x\cdot cos\alpha - y\cdot sin\alpha \\

y'&=r\cdot sin (\theta+\alpha) \\ &=r (sin\theta\cdot cos\alpha + cos\theta\cdot sin\alpha) \\ &=r (\frac{y}{r}cos\alpha + \frac{x}{r}sin\alpha) \\ &=y\cdot cos\alpha + x\cdot sin\alpha \\ \end{align} $$