We define a local co-ordinate system aligned with the lens, so that
the lens orientation is λL=0.
Let (x′,y′) be a point in the local frame, corresponding to (x,y) in
the global frame.
The calculation of roulette amplitudes takes three steps.
Calculate the partial derivatives of ψ with respect to
x′ and y′ up to required order.
This is done recursively using a CAS engine.
Calculate the partial derivatives of ψ with respect to
x and y up to required order, using the chain rule.
The first order derivatives of ψ are given in Theorem 1.
By rotating the co-ordinate frame (x,y)↦(x′,y′) by an angle λL,
we use an initial solution where λL=0, where the first derivatives
simplify to
The firstworker() function relies on sympy to do brute force
derivation of ψ at λL=0.
This is computationally expensive, and prohibitive beyond order m=5.
Inner differentation of the co-ordinate transformation¶