  The formation and properties of accretion discs and circumstellar material in
Algol-type systems is not very well understood. In order to study the
underlying physics of these structures, we have calculated synthetic Halpha
spectra of TT Hya, which is an Algol-type eclipsing binary with an accretion
disc. Both the primary and secondary stars were considered in the calculations
as well as a disc surrounding the primary. The Roche model for the secondary
star was assumed. The synthetic spectra cover all the phases including primary
eclipse and are compared with the observed spectra. The influence of various
effects and free parameters of the disc on the emerging spectrum was studied.
This enabled us to put some constraints on the geometry, temperature, density
and velocity fields within the disc. Differences found between the observed and
synthetic spectra unravel the existence of a gas stream as well as a hotter
disc-gas interaction region. An additional cooler circumstellar region between
the C1 and C2 Roche surfaces is suggested to account for various observed
effects. A new computer code called {\sc{shellspec}} was created for this
purpose and is briefly described in this work as well. It is designed to solve
simple radiative transfer along the line of sight in 3D moving media. The
scattered light from a central object is taken into account assuming an
optically thin environment. Output intensities are then integrated through the
2D projection surface of a 3D object. The assumptions of the code include LTE
and optional known state quantities and velocity fields in 3D.
