"Beyond the ABCDs: A projective geometry treatment of paraxial ray tracing using homogeneous coordinates" Theodore A. Corcovilos (c) 2023, American Journal of Physics 91(6):449-457. doi:10.1119/5.0083069 and also available at arXiv:2205.09746.
All of the examples in the manuscript are worked here in python using the symbolic algebra library sympy. The end section contains additional examples that were omitted from the final version of the paper.
This python script is a Jupyter notebook in the "percent" archival notebook format, but it is best viewed by first converting into the Jupyter notebook standard format using jupytext
.
jupytext --to ipynb worked-examples.py