A technique for developing radiating boundary conditions for artificial computational boundaries is described and applied to a class of problems typical in exploration seismology involving acoustic and elastic wave equations. First, one considers a constant coefficient scalar wave equation where the artificial boundary is one edge of a rectangular domain. By using continued fraction expansions, a systematic sequence of stable highly absorbing boundary conditions with successively better absorbing properties as the order of the boundary conditions increases is obtained. There follows a systematic derivation of a hierarchy of local radiating boundary conditions for the elastic wave equation. A theoretical procedure to guarantee stability at corners of the rectangular domain is worked out. A technique for fitting the discrete radiating boundary conditions directly to the difference scheme itself is proposed.