A review of the physical models for crystal optics in a ray tracing program is presented. X-ray monochromators and analyzers for synchrotron radiation applications in both Bragg (reflection) and Laue (transmission) geometries can be simulated with this method. Ray tracing calculations for several high-resolution and focusing geometries are presented, demonstrating the suitability of the ray tracing method for the design and optimization x-ray crystal optics. Possible applications to study the crystal effects on partially coherent beams are also outlined. All these systems have been modeled in the framework of the ray tracing program SHADOW. For increasing the visual and post-processing functionality of SHADOW we developed a front-end library an a Visual User Interface available from the author.