The means and functions of inputs for rtrace

The first 3 coordinates are the origin of the sample ray, and the second three define the direction of the ray as a vector. The length of this vector, i.e., sqrt(xdir^2 + ydir^2 + zdir^2), is ignored by rtrace unless the -ld+ option is specified.

For example, a ray starting from the point (1,3,9) and directed at the zenith (+Z direction) would be given as:

1 3 9 0 0 1

Giving this to rtrace, it follows the ray to see what part of the scene it intersects, then (by default) computes the color of that point and returns it as an RGB triplet.

I hope this helps!
-Greg

1 Like