Math 2.0

Optics, electromagnetic theory Definition

Ray tracing

Builds on Refractive indexOptical path lengthSnell's lawLaw of reflectionHamiltonian opticsOrdinary differential equation

Definition

Let a region of ℝ3\R^3 be split by smooth surfaces into parts, and let n>0n > 0 be a refractive index that is smooth in each part. A ray is a curve x(s)x(s), parametrized by arc length ss, with these properties:

  1. inside each part it satisfies the ray equation of geometrical optics dds(n(x)dxds)=∇n(x);\frac{d}{ds}\left( n(x) \frac{dx}{ds} \right) = \nabla n(x);
  2. where it meets a surface it continues as a refracted ray by Snell's law, or as a reflected ray by the law of reflection.

Ray tracing is the computation of rays from given starting points and directions. It solves the ray equation as an ordinary differential equation, numerically or by straight lines where nn is constant. It applies the rules of clause 2 at each surface. Along each ray it may also accumulate the optical path length ∫n ds\int n \, ds.

Remarks

Example: in a homogeneous medium, nn is constant and ∇n=0\nabla n = 0. The ray equation becomes n x′′=0n \, x'' = 0, so rays are straight lines, and ray tracing reduces to intersecting lines with surfaces.

Non-example: in the medium n(x,y,z)=1+ayn(x, y, z) = 1 + a y with a>0a > 0, the straight line x(s)=(s,0,0)x(s) = (s, 0, 0) is not a ray. Along it dds(nx′)=0\frac{d}{ds}(n x') = 0 while ∇n=(0,a,0)≠0\nabla n = (0, a, 0) \ne 0, so clause 1 fails; the true ray starting in this direction bends towards larger yy, where the index is larger.

In Hamiltonian form, with p=n dx/dsp = n \, dx/ds and the parameter σ\sigma such that dσ=ds/nd\sigma = ds / n, the ray equation becomes the first-order system dx/dσ=pdx/d\sigma = p, dp/dσ=n∇ndp/d\sigma = n \nabla n, with ∣p∣=n\abs{p} = n. This form is convenient for numerical integration.

Reading path

To understand this page from the ground up, read these 13 pages in order. The foundations come first.

Show the path as a graph
Each page uses the pages above it. The colour of the bar on a box shows how strong the evidence is, and the box also gives it as text. The list has the same pages.
  • no evidence level
  1. Calculus of variations concept
  2. Euler–Lagrange equation concept
  3. Geodesic concept
  4. Hamiltonian optics concept
  5. Normal vector concept
  6. Optical path length concept
  7. Ordinary differential equation concept
  8. Reflection concept
  9. Refractive index concept
  10. Fermat's principle statement
  11. Law of reflection statement
  12. Snell's law statement
  13. Ray tracing definition

Further reading

  1. Web https://en.wikipedia.org/wiki/Ray_tracing_(physics)
About this page
TagX4M5VYNMGY
URIm2://X4M5VYNMGY
Kinddefinition
WritingW0 stub
MSC78A05, 65D18
DefinesRay tracing
UsesRefractive index, Optical path length, Snell's law, Law of reflection, Hamiltonian optics, Ordinary differential equation
Changed3 November 2026

Markdown · JSON · Edit on GitHub

What this page needs for W1

  • an inventory row: the row of the inventory that the node accounts for (0 of 1)
  • a source with a locator (0 of 1)

The writing levels say how complete the text of a page is. They do not measure its truth.

What links here

No page links to this page yet.