When we think of ray tracing, we can think of the rays as a laser that coming out of superman’s eye. In nature, this process isn’t like that (Rays come to our eyes, not out of our eyes.) but if we want to do it like that we’ll need a lot of power and time. We can’t do this in real-time. (yet, also not useful for many cases) If we calculate the rays in the area we see to achieve the result we want, it is enough for us. At the same time, we don’t waste energy and time to make the entire field. But how we can use (or code) this ray.
In Wikipedia Ray define as:
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.
But what is Ray for us? For us, Ray means Vector that has an origin and direction. And if we have the length of the direction we can find the endpoint of that ray and this point is the golden key of ray tracing.