Modern physics and optics
Photon Trajectory Calculator
Estimate the endpoint, geometric distance, optical path length, and medium delay of a straight optical ray in one homogeneous isotropic medium.
CURRENT MODEL
Declare the start, direction, medium, and elapsed time
Optics students, laboratory planners, and educators screening a straight ray or narrowband wave-packet path before interface, dispersion, or scattering effects matter.
LIVE DECISION VIEW
Current ray path on a metre coordinate plane
The SVG places the start and endpoint on one shared x/y scale, so direction and geometric displacement remain visible while the exact ledger preserves more precision.
| Quantity | Symbol / expression | Current value | Unit | Interpretation |
|---|
Subject illustration
One declared medium, one uninterrupted optical path
This editorial scene shows the experimental boundary behind the arithmetic; the live SVG above carries the current coordinates and path values.

How to use
Turn a declared optical transit into a traceable endpoint
- Choose one x/y coordinate frame and record the ray start in metres.
- Enter any nonzero direction components; their scale does not matter because the model normalizes them.
- Use an effective refractive index that matches the material, wavelength, and pulse interpretation.
- Enter elapsed transit time in nanoseconds, including zero for the start-point boundary.
- Read the endpoint and geometric path together, then inspect optical path and medium delay.
- Reject the estimate if the path crosses an interface, a gradient, a scattering region, or a dispersive bandwidth that needs group-index data.
Trajectory fundamentals
Five ideas that define this straight-ray calculation
- Ray approximation
- A ray records propagation direction when wavelength-scale diffraction is not the decision being modeled.
- Unit direction
- Normalizing the entered components separates orientation from arbitrary vector length.
- Effective index
- The entered index converts exact vacuum light speed into the model transit speed for this medium.
- Geometric path
- This is physical distance along the straight ray, not wavelength count or optical path.
- Optical path length
- Uniform index multiplies geometric distance and provides the transit-time reconciliation OPL/c.
Calculation method
Normalize once, propagate in SI units, then reconcile time
The direction is divided by its Euclidean norm. Nanoseconds become seconds before multiplying by c/n. The resulting scalar distance moves the start point along the unit direction, while n times that distance gives optical path length.
The live coordinate view uses the same endpoint but rescales the drawing bounds so a short, long, horizontal, or diagonal path remains readable. It does not alter the entered coordinates.
Phase index versus timed pulses
The familiar n=c/v relation uses refractive index, but a pulse envelope can travel at group velocity. Timed propagation should use an effective group index or document negligible dispersion.
Why no bending appears
Snell refraction needs an interface and graded-index curvature needs spatial variation. A single constant n has no mechanism that changes direction.
Coordinate scale is not quantum certainty
The endpoint is a classical ray estimate. It does not claim simultaneous photon position and momentum, detector probability, coherence, or wave-packet width.
Detailed calculation process
Symbols, current substitution, intermediate quantities, and reconciliation
| Symbol | Meaning | Default | Unit |
|---|---|---|---|
| r_0 | Start coordinate | (0, 0) | m |
| d | Entered direction components | (3, 4) | dimensionless |
| d_hat | Normalized direction | (0.6, 0.8) | dimensionless |
| n | Effective refractive index | 1.5 | dimensionless |
| t | Elapsed transit time | 10 ns | s after conversion |
| c | Exact vacuum light speed | 299792458 | m/s |
| s | Geometric path length | calculated | m |
| OPL | Optical path length | calculated | m |
Waiting for valid inputs.
Result interpretation
Use the endpoint for geometry and optical path for timing
The endpoint answers where the straight model arrives in the declared frame. Geometric distance is the physical travel length; optical path is the index-weighted distance. Medium delay compares the same geometric distance with vacuum transit and is zero when n equals one.
Evidence to retain
Keep the medium and timing assumptions attached to the coordinates
Record material identity, wavelength or spectrum, temperature, pressure where relevant, source pulse width, whether n is phase or group index, coordinate origin, direction convention, chamber dimensions, interface locations, detector timing calibration, and the source of the index value.
Scope and limitations
Conditions that require a different propagation model
- Interfaces, prisms, lenses, mirrors, or graded-index paths
- Complex, negative, anisotropic, or spatially varying refractive index
- Material absorption, scattering, fluorescence, or detector response
- Pulse broadening where group delay varies across bandwidth
- Diffraction, interference, polarization evolution, or coherence analysis
- Quantum state, localization, emission, or detection probability
One homogeneous, isotropic, nonabsorbing medium; a nonzero two-dimensional direction; an effective refractive index from 1 to 5; negligible dispersion so the entered index can represent transit speed.
Key terminology
Optical-path glossary
- Geometric optics
- An approximation that represents propagation with rays rather than a full wave field.
- Refractive index
- The ratio connecting vacuum light speed to the modeled speed in a medium.
- Group velocity
- The velocity of a narrowband pulse envelope, which can differ from phase velocity.
- Optical path length
- The line integral of refractive index along geometric distance.
- Homogeneous medium
- A region whose model properties do not vary with position.
- Isotropic medium
- A material whose modeled index does not depend on propagation direction.
Practical cases
Two paths with different reasons to trust or reject the estimate
Uniform optical-cell timing screen
A 10 ns pulse estimate through a uniform chamber uses an effective index of 1.5 and a fixed 3:4 direction. The endpoint and OPL/c check support instrument-window planning before a detailed dispersion model.
Fiber route with a bend and connector
A technician cannot use one straight homogeneous ray for a curved fiber crossing a connector. The page can screen a short uniform segment, but the route requires guided-mode, path-geometry, and group-delay evidence.
Important note
Do not treat the line as a measured photon history
The result is a deterministic geometric-optics estimate. Use wave, electromagnetic, guided-mode, or quantum methods when those effects define the decision.
Frequently asked questions
Does this calculator track an individual photon as a quantum particle?
No. It uses a geometric-optics ray or narrowband wave-packet approximation. Quantum position measurements, diffraction, and probabilistic detection are outside its model.
Why must the direction vector be nonzero when elapsed time is zero?
The model normalizes the direction before propagation. A zero vector has no defined unit direction, even though a zero time interval would produce no displacement.
Should I enter phase index or group index?
For timed pulse propagation, use an effective group index or explicitly assume dispersion is negligible so phase and group indices are close over the pulse bandwidth.
Why does the ray remain straight?
The page assumes one homogeneous isotropic medium. Refraction requires an interface, and a curved ray requires a spatial index gradient or another model.
Can this model handle absorption or scattering?
No. It calculates geometry and transit only; it does not predict attenuation, mean free path, scattering direction, or detection probability.
What does optical path length mean here?
For uniform refractive index it is n times geometric distance. Dividing that optical path by the exact vacuum speed of light reconciles the entered transit time under the stated index assumption.
Authority and follow-on work
Reliable sources and related calculators
- BIPM - SI definition of the metreStates the exact numerical value of the speed of light used by the model.
- OpenStax University Physics - Propagation of LightDefines geometric optics and the relationship n=c/v, including wavelength dependence.
- NIST - Refractive IndexProvides the official refractive-index definition used for the speed bridge.