How would you solve after two variables in a two line equation system (containing trigonometric functions)?

39 Views Asked by At

I currently use two variables $x_p$ and $y_p$ to calculate two new coordinates $x_n$ and $y_n$. My question is now, could you solve after $x_p$ and $y_p$ somehow? I dont know how to do it.

$x_n=x_c + \sin(-2\pi\cdot\frac{x_p-x_c}{W}+\frac{\pi}{2})\cdot y_p$

$y_n=\cos(-2\pi\cdot\frac{x_p-x_c}{W}+\frac{\pi}{2})\cdot y_p$

1

There are 1 best solutions below

4
On BEST ANSWER

let $\theta \equiv -2\pi\cdot\frac{x_p-x_c}{W}+\frac{\pi}{2} $

then $$\begin{eqnarray*} y_p \sin\theta&=&x_n-x_c \\y_p \cos\theta&=&y_n \end{eqnarray*}$$ Square both equations and sum the result

$$y_p^2=y_P^2\sin^2\theta+ y_P^2\cos^2\theta=(x_n-x_c)^2+y_n^2$$

Then $$ \theta = \cos^{-1}\left( \frac{y_n}{y_p} \right) $$

and

$$ x_p = -\frac W{2\pi}\left( \theta-\frac\pi 2 \right)+x_c $$