We use a Monte Carlo radiative transfer code to examine the dependence of the properties of cyclotron resonant scattering lines on the spatial geometry and the optical depth of the line-forming region . We focus most of our attention on a line-forming region that is a plane-parallel slab . We also consider a cylindrical line-forming region . In both cases , the line-forming region contains an electron-proton plasma at the equilibrium Compton temperature , T _ { c } , and is threaded with a uniform magnetic field with strength \sim 10 ^ { 12 } gauss . We consider geometries in which the photon source illuminates the line-forming region from below , and in which the photon source is embedded in the line-forming region . The former may correspond to a line-forming region in the magnetosphere of a neutron star , illuminated from below ; the latter to a line-forming region on or near the surface of a neutron star as in an accretion column . In the case of the plane-parallel slab line-forming region , we study the behavior of the resonant Compton temperature and the properties of the cyclotron scattering lines as a function of the column depth of the line-forming region and the orientation of the magnetic field . At small or moderate optical depths ( N _ { e } \ll 10 ^ { 25 } { cm ^ { -2 } } [ electron scattering optical depth \tau _ { To } \ll 10 ] ) , the resonant Compton temperature ranges from T _ { e } / E _ { B } \approx 0.2 when the magnetic field is perpendicular to the slab to T _ { e } / E _ { B } \approx 0.4 when the field is parallel to the slab . At large optical depths ( N _ { e } \gtrsim 1.5 \times 10 ^ { 25 } { cm ^ { -2 } } [ \tau _ { To } \gtrsim 10 ] ) , the resonant Compton temperature is higher . At small or moderate optical depths ( \tau _ { To } \ll 10 ) , the equivalent widths , W _ { E } , of the spectral lines depend on two effects . First , W _ { E } increases as the viewing angle with respect to the field decreases , due to Doppler broadening . Second , W _ { E } increases as the viewing angle with respect to the slab normal increases , due to the increase in column depth along the line of sight . When the magnetic field is parallel to the slab and the viewing angle is along the field , for example , both effects are large ; in a line-forming region whose optical depth is moderate , the first harmonic equivalent width can reach \sim 0.75 E _ { B } . Shoulders are present on each side of the first harmonic line when the spectrum is viewed at angles with respect to the slab normal corresponding to \mu _ { sl } = \cos \theta _ { sl } \gtrsim 0.25 ( \theta _ { sl } \lesssim 75 ^ { o } ) , and become stronger with increasing column depth , until column depths N _ { e } \lesssim 1.5 \times 10 ^ { 25 } { cm ^ { -2 } } . As a result , the W _ { E } of the first harmonic reaches a maximum value , and then decreases with increasing column depth ( optical depth ) in the line-forming region . The shoulders are the result of injecting the photon spectrum at moderate optical depths . When the photon spectrum is injected at sufficiently large optical depths ( \tau _ { To } \gtrsim 10 ) , continuum scattering smears the shoulders so that they are no longer visible and the equivalent width of the first harmonic resumes increasing with increasing column depth . In the case of the cylindrical line-forming region , we consider only a magnetic field oriented along the axis of the cylinder . This corresponds to the situation expected in the canonical model of the emission region of accretion-powered pulsars . We find that the emerging spectrum is similar to that of the slab line-forming region with an embedded photon source and the magnetic field perpendicular to the slab normal . Thus , at large optical depths we expect the cyclotron line from a cylindrical line-forming region to have a very large equivalent width W _ { E } , nearly independent of viewing angle , and no visible shoulders . Our findings have implications for accretion-powered pulsars and gamma-ray bursters . In particular , the absence of pronounced shoulders on each side of the cyclotron first harmonic line in the spectra of accretion-powered pulsars suggests that the line-forming region is either illuminated from below and outside , as would be the case if it were plasma suspended in the magnetosphere of the neutron star , or it has a large ( \tau _ { To } \gtrsim 10 ) optical depth . Also , the ability of a slab line-forming region in which the magnetic field is parallel to the slab to produce narrow lines with large W _ { E } suggests that the lines observed in the X-ray spectra of some gamma-ray bursts might be able to be formed in plasma trapped at the magnetic equator of a neutron star .