A description of a detailed ray-tracing code for capillary optics is g
iven and a number of examples of the use of the program are discussed.
The model uses numerically defined capillary shapes and is able to si
mulate the behaviour of devices having shape distortions of various na
ture, including bending of the capillary. Comparisons are made with pr
eviously published capillary calculation models and with experimental
results described in the literature. The use of the code is also demon
strated for the optimization of conical capillary dimensions assuming
extended x-ray sources. With respect to the modelling of realistic cap
illary shapes, the beam transmission properties of an ellipsoidal devi
ce are calculated, using the experimentally determined capillary profi
le.