The k-function of Stavroudis describes a solution of the eikonal equation in a region of constant refractive index. Given the k-function describing the optical field in one region of space, and given a prescribed refractive or reflective boundary, we construct the k-function for the refracted or reflected field. This procedure, which Stavroudis calls refracting the k-function, can be repeated any number of times, and therefore extends the usefulness of the k-function formalism to multielement optical systems. As examples, we present an analytic solution for the k-function, wavefronts, and caustics generated by a biconvex thick lens illuminated by a plane wave propagating parallel to the symmetry axis, and numerical results for off-axis plane-wave illumination of a two-mirror telescope. © 2011 Optical Society of America.