We present a graded index (GRIN) design methodology for application in coherent beam shaping within the confines of geometric optics. In theory, a GRIN structure can be designed to convert a specific but arbitrary incident wave into any general amplitude and phase distribution. The incident and the desired output waves are converted into ray distributions where the local ray density is associated with the field amplitude and the ray direction and its optical path length are associated with the phase front of the waves. A set of ray paths is chosen to achieve the conversion between the initial and final ray distributions. Intermediate wavefronts are extrapolated from the ray paths and used to determine the refractive index profile required to effect the gradual evolution of the wave as it propagates through the structure. Our method is demonstrated by a GRIN structure design that converts a Gaussian beam into a flattop beam. In addition, several techniques used to reduce the dynamic range of the refractive index in the structure are examined and a design recipe is developed for this particular application. A ray trace shows that the resulting structure achieves the desired remapping of rays and produces a flat-top beam from an incident Gaussian beam.