  We present DART-Ray, a new ray-tracing 3D dust radiative transfer (RT) code
designed specifically to calculate radiation field energy density (RFED)
distributions within dusty galaxy models with arbitrary geometries. In this
paper we introduce the basic algorithm implemented in DART-Ray which is based
on a pre-calculation of a lower limit for the RFED distribution. This
pre-calculation allows us to estimate the extent of regions around the
radiation sources within which these sources contribute significantly to the
RFED. In this way, ray-tracing calculations can be restricted to take place
only within these regions, thus substantially reducing the computational time
compared to a complete ray-tracing RT calculation. Anisotropic scattering is
included in the code and handled in a similar fashion. Furthermore, the code
utilizes a Cartesian adaptive spatial grid and an iterative method has been
implemented to optimize the angular densities of the rays originated from each
emitting cell. In order to verify the accuracy of the RT calculations performed
by DART-Ray, we present results of comparisons with solutions obtained using
the DUSTY 1D RT code for a dust shell illuminated by a central point source and
existing 2D RT calculations of disc galaxies with diffusely distributed stellar
emission and dust opacity. Finally, we show the application of the code on a
spiral galaxy model with logarithmic spiral arms in order to measure the effect
of the spiral pattern on the attenuation and RFED.
