Ray optics is used to model the propagation of short electromagnetic plasma waves in toroidal geometry. The new RAYCON code evolves each ray independently in phase space, together with its amplitude, phase and focusing tensor to describe the transport of power along the ray. Particular emphasis is laid on caustics and mode conversion layers, where a linear phenomenon splits a single incoming ray into two. The complete mode conversion algorithm is described and tested for the first time, using the two space dimensions that are relevant in a tokamak. Applications are shown, using a cold plasma model to account for mode conversion at the ion-hybrid resonance in the Joint European Torus.