Existing algorithms can efficiently render refractive objects of constant refractive index. For a medium with a continuously varying index of refraction, most algorithms use the ray equation of geometric optics to compute piecewise-linear approximations of the non-linear rays. By assuming a constant refractive index within each tracing step, these methods often need a large number of small steps to generate satisfactory images. In this paper, we present a new approach for tracing non-constant, refractive media based on the ray equations of gradientindex optics. We show that in a medium of constant index gradient, the ray equation has a closed-form solution, and the intersection point between a ray and the medium boundaries can be efficiently computed using the bisection method. For general non-constant media, we model the refractive index as a piecewise-linear function and render the refraction by tracing the tetrahedron-based representation of the media. Our algorithm can be easily c...