imported>Paul Wormer |
imported>Paul Wormer |
Line 70: |
Line 70: |
| </math> | | </math> |
| Möller and Hughes (1999) refer to this century-old equation for the elements of '''R''' as the "Foley (1990) equation". | | Möller and Hughes (1999) refer to this century-old equation for the elements of '''R''' as the "Foley (1990) equation". |
| | | For normalized '''n''' the rotated vector may be written as: |
| | :<math> |
| | r'_{\alpha} = \sum_\beta R_{\alpha \beta} r_\beta = |
| | \sum_\beta \left[\cos\phi\; \delta_{\alpha \beta} + (1-\cos\phi)\hat{n}_\alpha \hat{n}_\beta - \sin\phi\; \epsilon_{\alpha \beta\gamma}\; \hat{n}_\gamma\right] r_\beta \quad \Rightarrow\quad |
| | \mathbf{r}' = \mathbf{r}\;\cos\phi + \hat{\mathbf{n}}\;\big(\hat{\mathbf{n}}\cdot \mathbf{r}\big)\big(1-\cos\phi\big) |
| | + (\hat{\mathbf{n}}\times\mathbf{r} )\;\sin\phi. |
| | </math> |
| Consider now two non-parallel unit vectors '''f''' and '''t''' making an angle φ | | Consider now two non-parallel unit vectors '''f''' and '''t''' making an angle φ |
| :<math> | | :<math> |
Revision as of 10:27, 17 April 2009
Given are two unnormalized, non-parallel vectors, the rotation axis n and the vector r to be rotated.
Decompose r into two orthogonal components:
![{\displaystyle \mathbf {r} =\mathbf {n} {\frac {\mathbf {n} \cdot \mathbf {r} }{n^{2}}}+\underbrace {(\mathbf {r} -\mathbf {n} {\frac {\mathbf {n} \cdot \mathbf {r} }{n^{2}}})} _{\equiv \;\mathbf {x} }\quad {\hbox{with}}\quad n^{2}\equiv \;\mathbf {n} \cdot \mathbf {n} }](https://wikimedia.org/api/rest_v1/media/math/render/svg/c33fe04c7268878585c666de05db07ee0eadc6b4)
Clearly, n and x are orthogonal. Define further y as a cross product, a vector orthogonal to the plane containing n, r, and x,
![{\displaystyle \mathbf {y} =\mathbf {n} \times \mathbf {r} .}](https://wikimedia.org/api/rest_v1/media/math/render/svg/c8a8df7336d1baffd048d9d9a950c133936c6b6b)
As is shown here the cross product can be written as a matrix-vector product
![{\displaystyle \mathbf {y} =\mathbf {n} \times \mathbf {r} ={\begin{pmatrix}n_{y}r_{z}-n_{z}r_{y}\\n_{z}r_{x}-n_{x}r_{z}\\n_{x}r_{y}-n_{y}r_{x}\end{pmatrix}}=\underbrace {\begin{pmatrix}0&-n_{z}&n_{y}\\n_{z}&0&-n_{x}\\-n_{y}&n_{x}&0\end{pmatrix}} _{\mathbf {N} }{\begin{pmatrix}r_{x}\\r_{y}\\r_{z}\end{pmatrix}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/5b4ea11a06697b183ec7832a8c8522e54ff4611e)
The matrix N has as general element
![{\displaystyle N_{\alpha \beta }=-\epsilon _{\alpha \beta \gamma }n_{\gamma }\,}](https://wikimedia.org/api/rest_v1/media/math/render/svg/305581008eead1eb01a3948145892292cbb9a215)
where εαβγ is the antisymmetric Levi-Civita tensor.
For further use we compute normalization constants of x and y,
![{\displaystyle x^{2}=\mathbf {x} \cdot \mathbf {x} =\left(\mathbf {r} -\mathbf {n} {\frac {\mathbf {n} \cdot \mathbf {r} }{n^{2}}}\right)\cdot \left(\mathbf {r} -\mathbf {n} {\frac {\mathbf {n} \cdot \mathbf {r} }{n^{2}}}\right)=r^{2}-{\frac {(\mathbf {n} \cdot \mathbf {r} )^{2}}{n^{2}}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/3e37d9b4da88d4fccc7f0847700c331b6b4828cd)
![{\displaystyle y^{2}=(\mathbf {n} \times \mathbf {r} )\cdot (\mathbf {n} \times \mathbf {r} )=n^{2}\,r^{2}-(\mathbf {n} \cdot \mathbf {r} )^{2},}](https://wikimedia.org/api/rest_v1/media/math/render/svg/76fb8edcf0e775ea6495ce55207240addee4905b)
and divide the two
![{\displaystyle {\frac {x^{2}}{y^{2}}}={\frac {r^{2}-{\frac {(\mathbf {n} \cdot \mathbf {r} )^{2}}{n^{2}}}}{n^{2}\,r^{2}-(\mathbf {n} \cdot \mathbf {r} )^{2}}}={\frac {1}{n^{2}}}.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/20fcd6a5e2fd00e7465284c59e1c63d7909851be)
When we rotate r over an angle φ around n, the component of r along n is unchanged, while the component x of r perpendicular to n becomes x′
![{\displaystyle \mathbf {x} '=\cos \phi \;\mathbf {x} +{\frac {x}{y}}\sin \phi \;\mathbf {y} =\cos \phi \;\mathbf {x} +{\frac {1}{n}}\sin \phi \;\mathbf {y} }](https://wikimedia.org/api/rest_v1/media/math/render/svg/b51e365962bec833ddb1f19d2c97c002bb023866)
Hence the rotated vector r′ is
![{\displaystyle \mathbf {r} '=\mathbf {n} {\frac {\mathbf {n} \cdot \mathbf {r} }{n^{2}}}+\cos \phi (\mathbf {r} -\mathbf {n} {\frac {\mathbf {n} \cdot \mathbf {r} }{n^{2}}})+{\frac {1}{n}}\sin \phi \;\mathbf {N} \;\mathbf {r} }](https://wikimedia.org/api/rest_v1/media/math/render/svg/a25c1013eb1076c317841e11ea8cac7e23b6b8dc)
We may introduce the dyadic product of the vector n with itself, which has the form of a 3 × 3 symmetric matrix, and write
![{\displaystyle \mathbf {n} {\frac {\mathbf {n} \cdot \mathbf {r} }{n^{2}}}={\frac {1}{n^{2}}}\;{\big (}\mathbf {n} \otimes \mathbf {n} {\big )}\;\mathbf {r} \quad {\hbox{with}}\quad {\big (}\mathbf {n} \otimes \mathbf {n} {\big )}_{\alpha \beta }\equiv n_{\alpha }\;n_{\beta }.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/bfc9104b4b8f2d4af6cefbe166d1777ebb071905)
Now,
![{\displaystyle \mathbf {r} '=\left[\cos \phi \;\mathbf {E} +{\frac {(1-\cos \phi )}{n^{2}}}\;{\big (}\mathbf {n} \otimes \mathbf {n} {\big )}+{\frac {1}{n}}\sin \phi \;\mathbf {N} \right]\mathbf {r} ,}](https://wikimedia.org/api/rest_v1/media/math/render/svg/f4327fbae77df335801e79619cf265e58a59c35a)
where E is the identity matrix. The quantity between square brackets is the matrix R that rotates r around n over an angle φ. This equation is very well-known and was first derived by Leonhard Euler [check].
A general element of R is
![{\displaystyle R_{\alpha \beta }=\cos \phi \;\delta _{\alpha \beta }+{\frac {(1-\cos \phi )}{n^{2}}}n_{\alpha }n_{\beta }-{\frac {\sin \phi }{n}}\epsilon _{\alpha \beta \gamma }n_{\gamma }=\cos \phi \;\delta _{\alpha \beta }+(1-\cos \phi ){\hat {n}}_{\alpha }{\hat {n}}_{\beta }-\sin \phi \;\epsilon _{\alpha \beta \gamma }\;{\hat {n}}_{\gamma },}](https://wikimedia.org/api/rest_v1/media/math/render/svg/48ac76953e68084e1651684200b358405ca76330)
where the unit vector is
![{\displaystyle {\hat {\mathbf {n} }}\equiv {\frac {\mathbf {n} }{n}}.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/27b07661c5c27843439c8c7689ecd12b4f97d9f5)
Möller and Hughes (1999) refer to this century-old equation for the elements of R as the "Foley (1990) equation".
For normalized n the rotated vector may be written as:
![{\displaystyle r'_{\alpha }=\sum _{\beta }R_{\alpha \beta }r_{\beta }=\sum _{\beta }\left[\cos \phi \;\delta _{\alpha \beta }+(1-\cos \phi ){\hat {n}}_{\alpha }{\hat {n}}_{\beta }-\sin \phi \;\epsilon _{\alpha \beta \gamma }\;{\hat {n}}_{\gamma }\right]r_{\beta }\quad \Rightarrow \quad \mathbf {r} '=\mathbf {r} \;\cos \phi +{\hat {\mathbf {n} }}\;{\big (}{\hat {\mathbf {n} }}\cdot \mathbf {r} {\big )}{\big (}1-\cos \phi {\big )}+({\hat {\mathbf {n} }}\times \mathbf {r} )\;\sin \phi .}](https://wikimedia.org/api/rest_v1/media/math/render/svg/5ad180b558b83834f176766f665698ccca18fd78)
Consider now two non-parallel unit vectors f and t making an angle φ
![{\displaystyle \mathbf {f} \cdot \mathbf {t} =\cos \phi \quad {\hbox{and}}\quad |\mathbf {f} \times \mathbf {t} |=\sin \phi }](https://wikimedia.org/api/rest_v1/media/math/render/svg/f0c00a3dfe8ff60c4f8894922565654667655d8c)
We want to find the matrix that rotates f (the "from" vector) to t (the "to" vector). An obvious way is using the cross product f×t as a rotation axis and rotating f over φ. We can use the equation just derived by substituting
![{\displaystyle \mathbf {n} \rightarrow \mathbf {f} \times \mathbf {t} \quad {\hbox{and}}\quad n\rightarrow \sin \phi .}](https://wikimedia.org/api/rest_v1/media/math/render/svg/d1ec8f980686b6550fa35eb1c7cf34769151d87a)
Hence
![{\displaystyle {\frac {(1-\cos \phi )}{n^{2}}}={\frac {(1-\cos \phi )}{1-\cos ^{2}\phi }}={\frac {1}{1+\cos \phi }}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/7241f6d57b00d4f428a5fc0f74e8d2cc96709546)
so that an element of the rotation matrix takes the form
![{\displaystyle R_{\alpha \beta }=\cos \phi \;\delta _{\alpha \beta }+{\frac {1}{1+\cos \phi }}n_{\alpha }n_{\beta }-\epsilon _{\alpha \beta \gamma }n_{\gamma },}](https://wikimedia.org/api/rest_v1/media/math/render/svg/ba30a32b1ae0e0a298d8c60ad96f970c3779cd7b)
which is Eq. (1) of Möller and Hughes (1999) modified by dividing out (1 - cosφ) in the second term, which M and H don't do.