Roulette Amplitudes for the SIE Lens
We define a local co-ordinate system aligned with the lens, so that
the lens orientation is θ = 0 \theta=0 θ = 0 . Let ( x ′ , y ′ ) (x',y') ( x ′ , y ′ ) be a point in the local frame, corresponding to ( x , y ) (x,y) ( x , y ) in
the global frame.
The calculation of roulette amplitudes takes three steps.
Calculate the partial derivatives of ψ \psi ψ with respect to
x ′ x' x ′ and y ′ y' y ′ up to required order.
This is done recursively using a CAS engine.
Calculate the partial derivatives of ψ \psi ψ with respect to
x x x and y y y up to required order, using the chain rule.
Calculate the roulette amplitudes α s m \alpha_s^m α s m and β s m \beta_s^m β s m .
First-order derivatives ¶ In the implementation, we calculate the first order derivatives of ψ \psi ψ as
∂ ψ R ∂ x = C 0 f f ′ ⋅ ( cos θ ⋅ sinh − 1 ( f ′ f ⋅ x cos θ + y sin θ R ) − sin θ ⋅ sin − 1 ( f ′ ⋅ − x sin θ + y cos θ R ) ) ∂ ψ R ∂ y = C 0 f f ′ ⋅ ( sin θ ⋅ sinh − 1 ( f ′ f ⋅ x cos θ + y sin θ R ) + cos θ ⋅ sin − 1 ( f ′ ⋅ − x sin θ + y cos θ R ) ) \begin{aligned}
\frac{\partial\psi^{\mathrm{R}}}{\partial x} &=
C_0\frac{\sqrt{f}}{f'}\cdot
\left(
\cos\theta\cdot\sinh^{-1}\left(\frac{f'}{f}\cdot\frac{x\cos\theta+y\sin\theta}{R}\right)
-\sin\theta\cdot\sin^{-1}\left(f'\cdot\frac{-x\sin\theta+y\cos\theta}{R}\right)
\right)
\\
\frac{\partial\psi^{\mathrm{R}}}{\partial y} &=
C_0\frac{\sqrt{f}}{f'}\cdot
\left(
\sin\theta\cdot\sinh^{-1}\left(\frac{f'}{f}\cdot\frac{x\cos\theta+y\sin\theta}{R}\right)
+\cos\theta\cdot\sin^{-1}\left(f'\cdot\frac{-x\sin\theta+y\cos\theta}{R}\right)
\right)
\end{aligned} ∂ x ∂ ψ R ∂ y ∂ ψ R = C 0 f ′ f ⋅ ( cos θ ⋅ sinh − 1 ( f f ′ ⋅ R x cos θ + y sin θ ) − sin θ ⋅ sin − 1 ( f ′ ⋅ R − x sin θ + y cos θ ) ) = C 0 f ′ f ⋅ ( sin θ ⋅ sinh − 1 ( f f ′ ⋅ R x cos θ + y sin θ ) + cos θ ⋅ sin − 1 ( f ′ ⋅ R − x sin θ + y cos θ ) ) where θ \theta θ is the orientation of the lens, and
f ′ = 1 − f 2 , C 0 = ξ 0 D L 2 \begin{aligned}
f' & =\sqrt{1-f^2},
\\
C_0 & = \frac{\xi_0}{D_L^2}
\end{aligned} f ′ C 0 = 1 − f 2 , = D L 2 ξ 0 For θ = 0 \theta=0 θ = 0 , this simplifies to
d d x ψ R ( x , y ) = C 0 f f ′ sinh − 1 ( f ′ f ⋅ x R ) d d y ψ R ( x , y ) = C 0 f f ′ sin − 1 ( f ′ ⋅ y R ) \begin{aligned}
\frac{d}{dx}\psi^{\mathrm{R}}(x,y) &=
C_0\frac{\sqrt{f}}{f'}
\sinh^{-1}\left(\frac{f'}{f}\cdot\frac{x}{R}\right)
\\
\frac{d}{dy}\psi^{\mathrm{R}}(x,y) &=
C_0\frac{\sqrt{f}}{f'}
\sin^{-1}\left(f'\cdot\frac{y}{R}\right)
\end{aligned} d x d ψ R ( x , y ) d y d ψ R ( x , y ) = C 0 f ′ f sinh − 1 ( f f ′ ⋅ R x ) = C 0 f ′ f sin − 1 ( f ′ ⋅ R y ) We take the same approach as we did with the raytrace equation,
finding the roulette amplitudes first for θ = 0 \theta=0 θ = 0 , and then
rotating the entire system to find the amplitudes for arbitrary
θ \theta θ .
The local co-ordinates are given as the rotation
\begin{aligned}
[ x ′ y ′ ] \begin{bmatrix} x' \\ y' \end{bmatrix} [ x ′ y ′ ] &=
[ cos θ sin θ − sin θ cos θ ] \begin{bmatrix}
\cos\theta & \sin\theta \\
-\sin\theta & \cos\theta
\end{bmatrix} [ cos θ − sin θ sin θ cos θ ] \cdot
[ x y ] \begin{bmatrix} x \\ y \end{bmatrix} [ x y ] \end{aligned}
We can differentiate the coordinates, so get
d x ′ d x = cos θ d x ′ d y = sin θ d y ′ d x = − sin θ d y ′ d y = cos θ \begin{align}
\frac{dx'}{dx} & = \cos\theta
\\
\frac{dx'}{dy} & = \sin\theta
\\
\frac{dy'}{dx} & = -\sin\theta
\\
\frac{dy'}{dy} & = \cos\theta
\end{align} d x d x ′ d y d x ′ d x d y ′ d y d y ′ = cos θ = sin θ = − sin θ = cos θ We use this with the chain rule below.
Step 2. Chain rule derivation. ¶ ∂ m + n ψ ( ∂ x ) m ( ∂ y ) n = ∑ i = 0 m ∑ j = 0 n ( m i ) ( n j ) cos m − i + j θ ⋅ sin n − j + i θ ⋅ ( − 1 ) i ⋅ ∂ m + n ψ ( ∂ x ′ ) m + n − i − j ( ∂ y ′ ) i + j \begin{aligned}
\frac{\partial^{m+n}\psi}{(\partial x)^m(\partial y)^n} =
\sum_{i=0}^m\sum_{j=0}^n
\binom{m}{i}\binom{n}{j}
\cos^{m-i+j}\theta\cdot
\sin^{n-j+i}\theta\cdot
(-1)^i\cdot
\frac{\partial^{m+n}\psi}{(\partial x')^{m+n-i-j}(\partial y')^{i+j}}
\end{aligned} ( ∂ x ) m ( ∂ y ) n ∂ m + n ψ = i = 0 ∑ m j = 0 ∑ n ( i m ) ( j n ) cos m − i + j θ ⋅ sin n − j + i θ ⋅ ( − 1 ) i ⋅ ( ∂ x ′ ) m + n − i − j ( ∂ y ′ ) i + j ∂ m + n ψ Step 3. Roulette Amplitudes ¶ Define
Γ s m = { 0 if m + s is even , − D L m + 1 2 m + δ 0 s ( m + 1 m + 1 − s 2 ) otherwise □ = ∂ 2 ( ∂ x ) 2 + ∂ 2 ( ∂ y ) 2 \begin{aligned}
\Gamma^m_s &=
\begin{cases}
0 \quad\text{if $m+s$ is even},\\
-\frac{D_L^{m+1}}{2^{m+\delta_{0s}}}\binom{m+1}{\frac{m+1-s}2} \quad \text{otherwise}
\end{cases} \\
\square &= \frac{\partial^2}{(\partial x)^2}
+ \frac{\partial^2}{(\partial y)^2}
\end{aligned} Γ s m □ = { 0 if m + s is even , − 2 m + δ 0 s D L m + 1 ( 2 m + 1 − s m + 1 ) otherwise = ( ∂ x ) 2 ∂ 2 + ( ∂ y ) 2 ∂ 2 Note that □ \square □ is an operator.
Then we have
α s m = Γ s m □ m + 1 − s 2 ∑ k = 0 ⌊ s / 2 ⌋ ( − 1 ) k ( s 2 k ) ∂ s ψ ( ∂ x ) s − 2 k ( ∂ y ) 2 k β s m = Γ s m □ m + 1 − s 2 ∑ k = 0 ⌊ ( s − 1 ) / 2 ⌋ ( − 1 ) k ( s 2 k + 1 ) ∂ s ψ ( ∂ x ) s − 2 k − 1 ( ∂ y ) 2 k + 1 \begin{aligned}
\alpha^m_s &=
\Gamma^m_s\square^{\frac{m+1-s}2}
\sum_{k=0}^{\lfloor s/2 \rfloor} (-1)^k
\binom{s}{2k}
\frac{\partial^s\psi}{(\partial x)^{s-2k}(\partial y)^{2k}}
\\
\beta^m_s &=
\Gamma^m_s\square^{\frac{m+1-s}2}
\sum_{k=0}^{\lfloor (s-1)/2\rfloor} (-1)^k
\binom{s}{2k+1}
\frac{\partial^s\psi}{(\partial x)^{s-2k-1}(\partial y)^{2k+1}}
\end{aligned} α s m β s m = Γ s m □ 2 m + 1 − s k = 0 ∑ ⌊ s /2 ⌋ ( − 1 ) k ( 2 k s ) ( ∂ x ) s − 2 k ( ∂ y ) 2 k ∂ s ψ = Γ s m □ 2 m + 1 − s k = 0 ∑ ⌊( s − 1 ) /2 ⌋ ( − 1 ) k ( 2 k + 1 s ) ( ∂ x ) s − 2 k − 1 ( ∂ y ) 2 k + 1 ∂ s ψ In practice, we omit the D L D_L D L factors, because they cancel against other factors
when the amplitudes are used in the deflection formulæ.
For implementation, we need to rewrite α s m \alpha_s^m α s m and β s m \beta_s^m β s m
without the □ \square □ operator.
We get
\begin{aligned}
\alpha^m_s(\vec{\xi}) &=
\Gamma^m_s
\sum_{k=0}^{\lfloor s/2 \rfloor} (-1)^k
\binom{s}{2k}
\sum_{h=0}^H\binom{H}{h}
\frac{\partial^{m+1}\psi(\vec{\xi})}
{(\partial x)^{m+1-2k-2h}(\partial y)^{2k+2h}}
\
\beta^m_s(\vec{\xi}) &= \Gamma^m_s
\sum_{k=0}^{\lfloor (s-1)/2\rfloor} (-1)^k
\binom{s}{2k+1}
\sum_{h=0}^H\binom{H}{h}
\frac{\partial^{m+1}\psi(\vec{\xi})}
{(\partial x)^{m-2k-2h}(\partial y)^{2k+2h+1}}
\end{aligned}
where
\begin{aligned}
H = \frac{m+1-s}{2}
\end{aligned}
Alternative Step 3. Roulette Amplitudes ¶ This uses the ECMS paper.
α s m = − 1 2 δ 0 s D L m + 1 ∑ k = 0 m ( m k ) ( C s m ( k ) ∂ ξ 1 + C s m ( k + 1 ) ∂ ξ 2 ) ∂ ξ 1 m − k ∂ ξ 2 k ψ β s m = − D L m + 1 ∑ k = 0 m ( m k ) ( S s m ( k ) ∂ ξ 1 + S s m ( k + 1 ) ∂ ξ 2 ) ∂ ξ 1 m − k ∂ ξ 2 k ψ \begin{aligned}
\alpha^m_s &=
-\frac{1}{2^{\delta_{0s}}} D^{m+1}_{\textrm{L}}
\sum_{k=0}^{m}\binom{m}{k}
\left({
\mathcal{C}}^{m(k)}_s\partial_{\xi_1}
+ \mathcal{C}^{m(k+1)}_s\partial_{\xi_2}
\right)
\partial^{m-k}_{\xi_1}\partial^k_{\xi_2}\psi
\\
\beta^m_s &=-D^{m+1}_\textrm{L}\sum_{k=0}^m\binom{m}{k}\left({\mathcal{S}}_s^{m(k)}\partial_{\xi_1}+{\mathcal{S}}_s^{m(k+1)}\partial_{\xi_2}\right)\partial_{\xi_1}^{m-k}\partial_{\xi_2}^k\psi
\end{aligned} α s m β s m = − 2 δ 0 s 1 D L m + 1 k = 0 ∑ m ( k m ) ( C s m ( k ) ∂ ξ 1 + C s m ( k + 1 ) ∂ ξ 2 ) ∂ ξ 1 m − k ∂ ξ 2 k ψ = − D L m + 1 k = 0 ∑ m ( k m ) ( S s m ( k ) ∂ ξ 1 + S s m ( k + 1 ) ∂ ξ 2 ) ∂ ξ 1 m − k ∂ ξ 2 k ψ where
\begin{aligned}
\mathcal{C}^{m(k)}s &= \frac{1}{\pi}\int {-\pi}^{\pi}{\rm d}\phi\sin^k\phi\cos^{m-k+1}\phi\cos s\phi
\
\mathcal{S}^{m(k)}s &= \frac{1}{\pi}\int {-\pi}^{\pi}{\rm d}\phi\sin^k\phi\cos^{m-k+1}\phi\sin s\phi
\end{aligned}
Rearranging, for the sake of implementation, we can write
α s m = − 1 2 δ 0 s D L m + 1 ∑ k = 0 m ( m k ) ( C s m ( k ) ∂ ξ 1 m − k + 1 ∂ ξ 2 k ψ + C s m ( k + 1 ) ∂ ξ 1 m − k ∂ ξ 2 k + 1 ψ ) β s m = − D L m + 1 ∑ k = 0 m ( m k ) ( S s m ( k ) ∂ ξ 1 m − k + 1 ∂ ξ 2 k ψ + S s m ( k + 1 ) ∂ ξ 1 m − k ∂ ξ 2 k + 1 ψ ) \begin{aligned}
\alpha^m_s &= - \frac1{2^{\delta_{0s}}} D_\textrm{L}^{m+1}
\sum_{k=0}^m\binom{m}{k}\left({\mathcal{C}}_s^{m(k)}
\partial_{\xi_1}^{m-k+1}\partial_{\xi_2}^k\psi
+{\mathcal{C}}_s^{m(k+1)}
\partial_{\xi_1}^{m-k}\partial_{\xi_2}^{k+1}\psi
\right)
\\
\beta^m_s &= -D_\textrm{L}^{m+1}\sum_{k=0}^m\binom{m}{k}\left(
{\mathcal{S}}_s^{m(k)}
\partial_{\xi_1}^{m-k+1}\partial_{\xi_2}^k\psi
+
{\mathcal{S}}_s^{m(k+1)}
\partial_{\xi_1}^{m-k}\partial_{\xi_2}^{k+1}\psi
\right)
\end{aligned} α s m β s m = − 2 δ 0 s 1 D L m + 1 k = 0 ∑ m ( k m ) ( C s m ( k ) ∂ ξ 1 m − k + 1 ∂ ξ 2 k ψ + C s m ( k + 1 ) ∂ ξ 1 m − k ∂ ξ 2 k + 1 ψ ) = − D L m + 1 k = 0 ∑ m ( k m ) ( S s m ( k ) ∂ ξ 1 m − k + 1 ∂ ξ 2 k ψ + S s m ( k + 1 ) ∂ ξ 1 m − k ∂ ξ 2 k + 1 ψ )