Calculation of wave amplitudes by ray tracing