Notes on seismic ray theory for spherical- and flat-earth models