We describe several extensions to TIM, a raytracing program for ray-optics research. These include relativistic raytracing; simulation of the external appearance of Eaton lenses, Luneburg lenses and generalised focusing gradient-index lens (GGRIN) lenses, which are types of perfect imaging devices; raytracing through interfaces between spaces with different optical metrics; and refraction with generalised confocal lenslet arrays, which are particularly versatile METATOYs. Program summaryProgram title: TIMCatalogue identifier: AEKY_v2_0Program summary URL:http://cpc.cs.qub.ac.uk/summaries/AEKY_v2_0.htmlProgram obtainable from: CPC Program Library, Queen’s University, Belfast, N. IrelandLicencing provisions: GNU General Public LicenseNo. of lines in distributed program, including test data, etc.: 106905No. of bytes in distributed program, including test data, etc.: 6327715Distribution format: tar.gzProgramming language: Java.Computer: Any computer capable of running the Java Virtual Machine (JVM) 1.6.Operating system: Any, developed under Mac OS X Version 10.6 and 10.8.3.RAM: Typically 130 MB (interactive version running under Mac OS X Version 10.8.3)Classification: 14, 18.Catalogue identifier of previous version: AEKY_v1_0Journal reference of previous version: Comput. Phys. Comm. 183(2012)711External routines: JAMA [1] (source code included)Does the new version supersede the previous version?: YesNature of problem:Visualisation of scenes that include scene objects that create wave-optically forbidden light-ray fields.Solution method: Ray tracing.Reasons for new version: Significant extension of the capabilities (see Summary of revisions), as demanded by our research.Summary of revisions:Added capabilities include the simulation of different types of camera moving at relativistic speeds relative to the scene; visualisation of the external appearance of generalised focusing gradient-index (GGRIN) lenses, including Maxwell fisheye, Eaton and Luneburg lenses; calculation of refraction at the interface between spaces with different optical metrics; and handling of generalised confocal lenslet arrays (gCLAs), a new type of METATOY.Unusual features:Specifically designed to visualise wave-optically forbidden light-ray fields; can visualise ray trajectories and geometric optic transformations; can simulate photos taken with different types of camera moving at relativistic speeds, interfaces between spaces with different optical metrics, the view through METATOYs and generalised focusing gradient-index lenses; can create anaglyphs (for viewing with coloured “3D glasses”), HDMI-1.4a standard 3D images, and random-dot autostereograms of the scene; integrable into web pages.Running time:Problem-dependent; typically seconds for a simple scene.