Turns out my pixel shader can be extended to simulating something more like a real accelerator cell with nonlinearities. This the dynamic aperture of a FODO cell with a sextupole defect in the F magnet, while I change the F magnet strength. Top left is real space XY, then X'Y', bottom left is XX' phase space, bottom right is YY'.

You can click and drag to change the F and D magnet strengths yourself at https://shadertoy.com/view/fXG3Wh
(may require a strong graphics card)

#physics #accelerators #nonlineardynamics