Friday, March 23, 2012

What is a Ray ?

To talk about ray let me first talk about a line, a line is a parametric equation based on a point and a vector. It will have a point P which is the point @ which line starts and a direction V which is a vector as shown in image.


A point on line can be represented as where t is a scalar

Point(t) = P + t * V


Varying t will give you points on the line, Now let’s see what is the difference between a line and a Ray, a line extends to both direction whereas a Ray has a origin and one direction @ which it travels. Also for a ray t must be a non-negative value.