General 4×4 transfer-matrix method (TMM) for optical simulations of isotropic and anisotropic multilayer structures. C++ core with Python bindings.