Change of base matrix between displaced and rotated coordinate systems

45 Views Asked by At

I have a function that solves a problem when a specific angle equals $0$. The same function can be used with non-zero angles if you compute the problem from other coordinate system.

The scheme of the problem is: Scheme

I need help to figure out the transformation matrix between these two coordinate system, both $B_1 \to B_0$ and $B_0 \to B_1$.

Thanks

1

There are 1 best solutions below

0
On BEST ANSWER

I have figured out the answer. In case someone needs something like this, I post it here.

$B_1 \to B_0$:

$$\begin{pmatrix}x\\\ y\\\ z\\\ 1\end{pmatrix}=\begin{pmatrix}1 & 0 & 0 & 0\\\ 0 & cos(ψ) & sin(ψ) & -h·tan(ψ)\\\ 0 & -sin(ψ) & cos(ψ) & 0\\\ 0 & 0 & 0 & 1\end{pmatrix}·\begin{pmatrix}x'\\\ y'\\\ z'\\\ 1\end{pmatrix}$$

$B_0 \to B_1$:

$$\begin{pmatrix}x'\\\ y'\\\ z'\\\ 1\end{pmatrix}=\begin{pmatrix}1 & 0 & 0 & 0\\\ 0 & cos(ψ) & -sin(ψ) & h·sin(ψ)\\\ 0 & sin(ψ) & cos(ψ) & h·sin^2(ψ)/cos(ψ)\\\ 0 & 0 & 0 & 1\end{pmatrix}·\begin{pmatrix}x\\\ y\\\ z\\\ 1\end{pmatrix}$$