| Previous Topic | Next Topic | Contents | Features |
In ray tracing, an imaginary grid of pixels is placed in a viewplane between the eye (viewpoint) and the object. A ray follows a path from the viewpoint, through a pixel, and to the object. When a ray intersects an opaque object, the color and orientation of the surface it encounters determine the color and intensity of the pixel. This information is used to color the pixels on the screen.
Ray tracing is invoked by COLOR. In addition to these "color shaded'' images, the ray tracing algorithms may also be used to produce an etch image when ETCH is used. Rather than the color, the rays return the surface number encountered, and lines are drawn between rays intersecting different surfaces. A drawing showing visible surface and cell boundaries and intersections is made. Etching is useful for producing monochrome images.
When checking for geometry errors (volumes of space that are not defined or belong to more than a single zone), the rays continue through the model rather than terminate at the first opaque surface reached.
The ray-tracing algorithm requires knowledge of the spatial extent of the model; this is given (by the WINDOW command) as the bounds of a three-dimensional bounding box, (usually) enclosing the model. The corners of this box, known as the spatial window, are projected onto the viewplane, and the minimum and maximum horizontal and vertical projections are used to set the viewplane extents.
Some zones must be opaque (rather than the default transparent) for a ray-traced image to be meaningful. (If Sabrina encounters an MCNP geometry with all cells transparent, it sets all cells with a nonzero material to opaque.)