This paper presents a geometrically based algorithm for computing synthetic seismograms for energy transmitted through a 3-D velocity distribution. 3-D ray tracing is performed to compute the traveltimes and geometrical spreading (amplitude). The formulations of both kinematic and dynamic ray-tracing systems are presented. The two-point ray-tracing problem is solved by systematically updating the initial conditions and adjusting the ray direction until the ray intersects the specified endpoint. The amount of adjustment required depends on the derivatives of the position with respect to the given starting angles between consecutive rays. The algorithm uses derivatives to define the steepest-descent direction and to update the initial directions. The convergence rate depends on the complexity of the model. Test seismograms compare favourably with those from a 2-D asymptotic ray theory algorithm and a 3-D Gaussian-beam algorithm. The algorithm is flexible in modelling arbitrary source and recorder geometries for various smoothly varying 3-D velocity distributions. The algorithm is further tested by simulating surface-to-tunnel vibroseis field data. Shear waves as well as compressional waves may be approximately included. Application of the algorithm to a data set from the Rainier Mesa of the Nevada Test Site produced a good fit to the transmitted (first arrival) traveltimes and amplitudes, with approximately 15 per cent variation in the local 3-D velocity.