# Ray (optics)

In optics, a ray is an idealized geometrical model of light or other electromagnetic radiation, obtained by choosing a curve that is perpendicular to the wavefronts of the actual light, and that points in the direction of energy flow. Rays are used to model the propagation of light through an optical system, by dividing the real light field up into discrete rays that can be computationally propagated through the system by the techniques of ray tracing. This allows even very complex optical systems to be analyzed mathematically or simulated by computer. Ray tracing uses approximate solutions to Maxwell's equations that are valid as long as the light waves propagate through and around objects whose dimensions are much greater than the light's wavelength. Ray optics or geometrical optics does not describe phenomena such as diffraction, which require wave optics theory. Some wave phenomena such as interference can be modeled in limited circumstances by adding phase to the ray model.

## Definition

A light ray is a line (straight or curved) that is perpendicular to the light's wavefronts; its tangent is collinear with the wave vector. Light rays in homogeneous media are straight. They bend at the interface between two dissimilar media and may be curved in a medium in which the refractive index changes. Geometric optics describes how rays propagate through an optical system. Objects to be imaged are treated as collections of independent point sources, each producing spherical wavefronts and corresponding outward rays. Rays from each object point can be mathematically propagated to locate the corresponding point on the image.
A slightly more rigorous definition of a light ray follows from Fermat's principle, which states that the path taken between two points by a ray of light is the path that can be traversed in the least time.

## Special rays

There are many special rays that are used in optical modelling to analyze an optical system. These are defined and described below, grouped by the type of system they are used to model.

### Interaction with surfaces

* An incident ray is a ray of light that strikes a surface. The angle between this ray and the perpendicular or normal to the surface is the angle of incidence.
* The reflected ray corresponding to a given incident ray, is the ray that represents the light reflected by the surface. The angle between the surface normal and the reflected ray is known as the angle of reflection. The Law of Reflection says that for a specular (non-scattering) surface, the angle of reflection is always equal to the angle of incidence.
* The refracted ray or transmitted ray corresponding to a given incident ray represents the light that is transmitted through the surface. The angle between this ray and the normal is known as the angle of refraction, and it is given by Snell's law. Conservation of energy requires that the power in the incident ray must equal the sum of the power in the refracted ray, the power in the reflected ray, and any power absorbed at the surface.
* If the material is birefringent, the refracted ray may split into ordinary and extraordinary rays, which experience different indexes of refraction when passing through the birefringent material.

### Optical systems

* A meridional ray or tangential ray is a ray that is confined to the plane containing the system's optical axis and the object point from which the ray originated. This plane is called meridional plane or tangential plane.
* A skew ray is a ray that does not propagate in a plane that contains both the object point and the optical axis (meridional or tangential plane). Such rays do not cross the optical axis anywhere and are not parallel to it.
* The exit pupil is the image of the aperture stop formed by the optics behind it, and the location and size of the pupil are determined by chief rays and marginal rays.The marginal ray (sometimes known as an a ray or a marginal axial ray) in an optical system is the meridional ray that starts from an on-axis object point (the point where an object to be imaged crosses the optical axis) and touches an edge of the aperture stop of the system. This ray is useful, because it crosses the optical axis again at the location where a real image will be formed, or the backward extension of the ray path crosses the axis where a virtual image will be formed. Since the entrance pupil and exit pupil are images of the aperture stop, for a real image pupil, the lateral distance of the marginal ray from the optical axis at the pupil location defines the pupil size. For a virtual image pupil, an extended line, forward along the marginal ray before the first optical element or backward along the marginal ray after the last optical element, determines the size of the entrance or exit pupil, respectively.
* The principal ray or chief ray (sometimes known as the b ray) in an optical system is the meridional ray that starts at an edge of an object and passes through the center of the aperture stop. The distance between the chief ray (or an extension of it for a virtual image) and the optical axis at an image location defines the size of the image. This ray (or forward and backward extensions of it for virtual image pupils) crosses the optical axis at the locations of the entrance and exit pupils. The marginal and chief rays together define the Lagrange invariant, which characterizes the throughput or etendue of the optical system. Some authors define a "principal ray" for each object point, and in this case, the principal ray starting at an edge point of the object may then be called the marginal principal ray.
* A sagittal ray or transverse ray from an off-axis object point is a ray propagating in the plane that is perpendicular to the meridional plane for this object point and contains the principal ray (for the object point) before refraction (so along the original principal ray direction). This plane is called sagittal plane. Sagittal rays intersect the pupil along a line that is perpendicular to the meridional plane for the ray's object point and passes through the optical axis. If the axis direction is defined to be the z axis, and the meridional plane is the y-z plane, sagittal rays intersect the pupil at y$_p$= 0. The principal ray is both sagittal and meridional. All other sagittal rays are skew rays.
* A paraxial ray is a ray that makes a small angle to the optical axis of the system and lies close to the axis throughout the system. Such rays can be modeled reasonably well by using the paraxial approximation. When discussing ray tracing this definition is often reversed: a "paraxial ray" is then a ray that is modeled using the paraxial approximation, not necessarily a ray that remains close to the axis.
* A finite ray or real ray is a ray that is traced without making the paraxial approximation.
* A parabasal ray is a ray that propagates close to some defined "base ray" rather than the optical axis. This is more appropriate than the paraxial model in systems that lack symmetry about the optical axis. In computer modeling, parabasal rays are "real rays", that is rays that are treated without making the paraxial approximation. Parabasal rays about the optical axis are sometimes used to calculate first-order properties of optical systems.

### Fiber optics

* A meridional ray is a ray that passes through the axis of an optical fiber.
* A skew ray is a ray that travels in a non-planar zig-zag path and never crosses the axis of an optical fiber.
* A guided ray, bound ray, or trapped ray is a ray in a multi-mode optical fiber, which is confined by the core. For step index fiber, light entering the fiber will be guided if it makes an angle with the fiber axis that is less than the fiber's acceptance angle.
* A leaky ray or tunneling ray is a ray in an optical fiber that geometric optics predicts would totally reflect at the boundary between the core and the cladding, but which suffers loss due to the curved core boundary.

## Geometrical optics

Geometrical optics, or ray optics, is a model of optics that describes light propagation in terms of rays. The ray in geometrical optics is an abstraction useful for approximating the paths along which light propagates under certain circumstances.
The simplifying assumptions of geometrical optics include that light rays:
* propagate in straight-line paths as they travel in a homogeneous medium
* bend, and in particular circumstances may split in two, at the interface between two dissimilar media
* follow curved paths in a medium in which the refractive index changes
* may be absorbed or reflected.

## Ray tracing

In physics, ray tracing is a method for calculating the path of waves or particles through a system with regions of varying propagation velocity, absorption characteristics, and reflecting surfaces. Under these circumstances, wavefronts may bend, change direction, or reflect off surfaces, complicating analysis.
Historically, ray tracing involved analytic solutions to the ray's trajectories. In modern applied physics and engineering physics, the term also encompasses numerical solutions to the Eikonal equation. For example, ray-marching involves repeatedly advancing idealized narrow beams called rays through the medium by discrete amounts. Simple problems can be analyzed by propagating a few rays using simple mathematics. More detailed analysis can be performed by using a computer to propagate many rays.
When applied to problems of electromagnetic radiation, ray tracing often relies on approximate solutions to Maxwell's equations such as geometric optics, that are valid as long as the light waves propagate through and around objects whose dimensions are much greater than the light's wavelength. Ray theory can describe interference by accumulating the phase during ray tracing (e.g., complex-valued Fresnel coefficients and Jones calculus). It can also be extended to describe edge diffraction, with modifications such as the geometric theory of diffraction, which enables tracing diffracted rays.