Talk:Extra:Intersecting planes

From GISAXS
Jump to: navigation, search

Rotate \mathbf{v}_{2b} about \mathbf{n}_{1}

In general, rotation of a vector \scriptstyle 
\mathbf{v}_{\mathrm{start}} = \begin{bmatrix} x & y  & z \end{bmatrix}about an arbitrary unit-vector \scriptstyle 
\mathbf{n} = \begin{bmatrix} u & v  & w \end{bmatrix} gives (1, 2):


\mathbf{v}_{\mathrm{end}} = \begin{bmatrix} u(ux +vy+wz)(1-\cos \theta) + x \cos \theta + (-wy+vz)\sin \theta \\
v(ux+vy+wz)(1 - \cos \theta) + y \cos \theta + (wx-uz) \sin \theta\\ 
w(ux+vy+wz)(1-\cos \theta) + z \cos \theta + (-vx+uy) \sin \theta \end{bmatrix}

In this particular case, we thus expect:


\begin{alignat}{2}
\mathbf{v}_{2} & = \begin{bmatrix} -y\sin \phi \\
y \cos \phi \\ 
z(1-\cos \phi) + z \cos \phi\end{bmatrix}
\\
  & = \begin{bmatrix} -q \cos \alpha\sin \phi \\
q \cos \alpha \cos \phi \\ 
q \sin \alpha(1-\cos \phi) + q \sin \alpha \cos \phi\end{bmatrix}
\\
  & = q \begin{bmatrix} - \cos \alpha\sin \phi \\
 \cos \alpha \cos \phi \\ 
 \sin \alpha\end{bmatrix}
\end{alignat}


Rotate \mathbf{v}_{2b} about \mathbf{n}_{2}

In general, rotation of a vector \scriptstyle 
\mathbf{v}_{\mathrm{start}} = \begin{bmatrix} x & y  & z \end{bmatrix}about an arbitrary unit-vector \scriptstyle 
\mathbf{n} = \begin{bmatrix} u & v  & w \end{bmatrix} gives (1, 2):


\mathbf{v}_{\mathrm{end}} = \begin{bmatrix} u(ux +vy+wz)(1-\cos \theta) + x \cos \theta + (-wy+vz)\sin \theta \\
v(ux+vy+wz)(1 - \cos \theta) + y \cos \theta + (wx-uz) \sin \theta\\ 
w(ux+vy+wz)(1-\cos \theta) + z \cos \theta + (-vx+uy) \sin \theta \end{bmatrix}

In this particular case, we thus expect:


\begin{alignat}{2}
\mathbf{v}_{2} & = \begin{bmatrix} (-wy+vz)\sin \phi \\
v(vy+wz)(1 - \cos \phi) + y \cos \phi \\ 
w(vy+wz)(1-\cos \phi) + z \cos \phi\end{bmatrix}
\\
    & = \begin{bmatrix} (- \cos\alpha q \cos\alpha + -\sin\alpha q \sin\alpha)\sin \phi \\
-\sin\alpha(-\sin\alpha q \cos\alpha+\cos\alpha q \sin\alpha)(1 - \cos \phi) + q \cos\alpha \cos \phi \\ 
\cos\alpha(-\sin\alpha q \cos\alpha+ \cos\alpha q \sin\alpha)(1-\cos \phi) + q \sin\alpha \cos \phi\end{bmatrix}
\\
    & = q \begin{bmatrix} -(\cos^2 \alpha +\sin ^2 \alpha)\sin \phi \\
\sin^2 \alpha(\cos\alpha-\cos\alpha )(1 - \cos \phi) + \cos\alpha \cos \phi \\ 
\cos^2 \alpha(-\sin\alpha + \sin\alpha)(1-\cos \phi) + \sin\alpha \cos \phi\end{bmatrix}
\\
    & = q \begin{bmatrix} -\sin \phi \\
\cos\alpha \cos \phi \\ 
\sin\alpha \cos \phi\end{bmatrix}
\end{alignat}


Generalized distance between two vectors

Warning: Errors below (this is just intermediate/working stuff)

Imagine reciprocal-space scattering that is a ring; more specifically a pseudo-toroid with Gaussian-like decay. The intensity overall is:


I = \exp \left [ -(q_{rr}-q_0)^2/(2 \sigma_q^2) \right ] \exp \left [ -q_{rz}^2/(2 \sigma_q^2) \right ]

Where we use the subscript r to denote the reciprocal-space coordinate system, and \scriptstyle q_{rr} = \sqrt{q_{rx}^2+q_{ry}^2}. The plane of the detector (i.e. the Ewald plane) is denoted by d:


\mathbf{v}_{d} = \begin{bmatrix} q_{dx} & q_{dy}  & 0 \end{bmatrix}

We set the symmetry axis in realspace (detector coordinate system) to be the \scriptstyle x-axis. The reciprocal-space is tilted by \scriptstyle \chi_0 (about the \scriptstyle y-axis), before the 'powder' rotation about the \scriptstyle x-axis (where \scriptstyle \alpha goes from \scriptstyle -\pi to \scriptstyle +\pi). Consider an initial vector:


\mathbf{v}_{d0} = \begin{bmatrix} q \sin \phi & q \cos \phi  & 0 \end{bmatrix}

The 1st rotation (about \scriptstyle y-axis by \scriptstyle \chi_0) involves:


\begin{alignat}{2}
\mathbf{v}_{d1} & = R_y(\chi_0) \mathbf{v}_{d0} \\
    & = \begin{bmatrix}
\cos \chi_0 & 0 & \sin \chi_0 \\
0 & 1 & 0 \\
-\sin \chi_0 & 0 & \cos \chi_0 \\
\end{bmatrix}
\begin{bmatrix}
q \sin \phi \\
q \cos \phi \\
0 \\
\end{bmatrix} \\
    & = \begin{bmatrix}
q \sin \phi \cos \chi_0 \\
q \cos \phi \\
- q \sin \phi \sin \chi_0 \\
\end{bmatrix}
\end{alignat}

Consider a 2nd rotation around the vector (normal to the detector plane) (Warning: This is erroneous since the alpha rotation is just another phi rotation.):


\begin{alignat}{2}
\mathbf{n}_{d1} & = R_y(\chi_0) \mathbf{n}_{d0} \\
    & = \begin{bmatrix}
\cos \chi_0 & 0 & \sin \chi_0 \\
0 & 1 & 0 \\
-\sin \chi_0 & 0 & \cos \chi_0 \\
\end{bmatrix}
\begin{bmatrix}
0 \\
0 \\
1 \\
\end{bmatrix} \\
    & = \begin{bmatrix}
\sin \chi_0 \\
0 \\
\cos \chi_0 \\
\end{bmatrix}
\end{alignat}

So the second rotation yields:


\begin{alignat}{2}
\mathbf{v}_{d2} & = 
\begin{bmatrix} u(ux +wz)(1-\cos \alpha) + x \cos \alpha + -wy \sin \alpha \\
y \cos \alpha + (wx-uz) \sin \alpha\\ 
w(ux+wz)(1-\cos \alpha) + z \cos \alpha + uy \sin \alpha \end{bmatrix} \\
    & =
\begin{bmatrix} \sin \chi_0 (\sin \chi_0 q \sin \phi \cos \chi_0 - \cos \chi_0 q \sin \phi \sin \chi_0)(1-\cos \alpha) + q \sin \phi \cos \chi_0 \cos \alpha + - \cos \chi_0 q \cos \phi \sin \alpha \\
q \cos \phi \cos \alpha + (\cos \chi_0 q \sin \phi \cos \chi_0 + \sin \chi_0 q \sin \phi \sin \chi_0) \sin \alpha\\ 
\cos \chi_0(\sin \chi_0 q \sin \phi \cos \chi_0 - \cos \chi_0 q \sin \phi \sin \chi_0)(1-\cos \alpha) + - q \sin \phi \sin \chi_0 \cos \alpha + \sin \chi_0 q \cos \phi \sin \alpha \end{bmatrix} \\
    & =
q \begin{bmatrix} \sin^2 \chi_0 \sin \phi (\cos \chi_0 - \cos \chi_0 )(1-\cos \alpha) + \sin \phi \cos \chi_0 \cos \alpha - \cos \chi_0 \cos \phi \sin \alpha \\
\cos \phi \cos \alpha + \sin \phi (\cos^2 \chi_0 + \sin^2 \chi_0 ) \sin \alpha\\ 
\cos \chi_0 \sin \chi_0 \sin \phi (\cos \chi_0 - \cos \chi_0 )(1-\cos \alpha) - \sin \phi \sin \chi_0 \cos \alpha + \sin \chi_0 \cos \phi \sin \alpha \end{bmatrix} \\

    & =
q \begin{bmatrix} \cos \chi_0 ( \sin \phi \cos \alpha - \cos \phi \sin \alpha ) \\
\cos \phi \cos \alpha + \sin \phi  \sin \alpha\\ 
-\sin \chi_0 ( \sin \phi \cos \alpha - \cos \phi \sin \alpha ) \end{bmatrix} \\

\end{alignat}