Previous Topic     Contents   Features

X-ray Simulation


An X-ray mode simulates a radiograph by exponential attenuation of the intensity along a track. Any resemblance to real physics is coincidental. The radiograph is projected onto a surface, which must be a plane behind the geometry being X-rayed. As in normal ray tracing, rays are tracked from the viewpoint to the model. In the X-ray mode, the intensity of the rays are attenuated as they pass through absorbing cells, and the intensity is recorded on the X-ray plane. Attenuation coefficients may be specified by material or cell by the QBRIGHT command-the minimum brightness level Bl is used as the attenuation coefficient.

The command is

XRAY Plane-Surface Energy Resolution

For each segment of a ray through a cell, the intensity is diminished by

I --> I exp ( -S Bl / E )

where S is the path length through the cell, Bl is the attenuation coefficient specified as the minimum brightness, and E is the X-ray simulation energy. The default energy is 1. For no attenuation along a ray, the intensity remains at full brightness; severe attenuation results in black. The default color is white; this color may be changed with Xray under the Set Colors submenu of the Graphics menu or QPALET X. A black X-ray color results in a negative image.

The resolution determines whether more pixels need to be calculated in a block, rather than the block filled in by averaging the pixels already calculated-if the corners, and in the case of a major block, the center, have intensities differing by no more than the resolution, averaging is done. The default resolution is 0.05. Even with a stringent resolution setting, vestiges of the major block may appear in the image, resulting in a jagged appearance. The super resolution mode, where each pixel is ray-traced unconditionally, will alleviate this problem.

The examples directory contains a model described in body geometry in xbox_body.sab and in surface geometry in xbox_surf.sab. A simpler example of the X-ray mode is xspheres.sab.