loading...
running...
How to use
Pick a preset or move the sliders. The blue curve is the beam leaving the tube; the grey curve is what the anode emits before filtration. Try: (1) raise the tube voltage and watch the spectrum end at exactly that energy and the tungsten K lines appear above 69.5 keV; (2) add copper and see the HVL grow while the skin kerma falls; (3) switch to the Mo anode with the Mo filter: the K-edge cuts the spectrum just above 20 keV; (4) choose the iodine angiogram preset and compare the vessel brightness at 40, 60 and 120 kVp; (5) thicken the patient with the grid off and see the scatter-to-primary ratio rise and the contrast fall; (6) look at the third graph: for a fixed signal behind the patient the skin kerma falls fast with voltage while the CNR falls slowly. Space pauses, R resets.
The 3D page puts the same model in a radiography room: the tube height follows the source-to-image distance, the glowing cone is the collimated beam, coloured photons are drawn from the filtered spectrum (violet is soft, white is hard) and stop in the hand with the probability set by Beer-Lambert. The room, tube, table, detector, console and hand phantom are Blender 5.2 models with baked PBR textures. Drag to orbit, wheel to zoom.
The science
What this lab shows. How an X-ray tube makes a spectrum of photons, how filtration reshapes it, and how the photoelectric effect and Compton scattering turn that spectrum into the grey levels of a radiograph. Electrons accelerated through the tube voltage strike a tungsten (or molybdenum, rhodium) anode; the photons that leave the tube are filtered, pass through the patient, and are counted by a scintillator detector. Contrast, noise and dose all follow from that chain, and each of them is shown live.
1. Bremsstrahlung (Kramers' law). A decelerating electron radiates a continuous spectrum. For a thick target the photon number per unit energy is, to a good approximation,
N(E) dE = K Z (E0 - E) / E dE, 0 < E < E0 = e V
so the spectrum ends exactly at the tube voltage (Duane-Hunt law: λmin = hc / eV = 12.398 / VkVp Å), and the total grows like Z V2. This lab uses the photon-number form shown here; the energy fluence is E N(E).
2. Characteristic lines. If the tube voltage exceeds the K-edge of the anode (69.5 keV for tungsten, 20.0 keV for molybdenum, 23.2 keV for rhodium) K-shell vacancies are created and the K lines appear on top of the continuum. Their strength is taken as proportional to Z (U - 1)1.63 with U = V / EK (a standard empirical form), split between Kα1, Kα2 and Kβ. The weights are tuned so the lines carry about a tenth of the beam at 100 kVp; they are illustrative.
3. Attenuation. A narrow beam of photons of energy E crossing thickness x of a material is reduced by the Beer-Lambert law:
I = I0 e-μ(E) x, μ/ρ = (NA/A) [ Z σKN(E) + τa(E) ]
The Compton term uses the Klein-Nishina cross-section per electron (computed exactly; σ(100 keV) = 0.4927 b). The photoelectric term is modelled as τa = k Z4.3 / E2.95, fitted to reference values for aluminium and water at 30, 50 and 100 keV, with a K-edge drop below the absorption edge of Cu, Mo, Rh, I, Cs and W. Coherent (Rayleigh) scattering and L edges are not included, so μ is accurate to about 10 to 20 percent, more near the edges. Bone is cortical bone (1.92 g/cm3, calcium and phosphorus rich); the iodine contrast is 225 mg/mL I in water.
4. Half-value layer and beam hardening. The HVL is the thickness that halves the air kerma. Because low-energy photons are removed first, the HVL increases with filtration: the beam hardens. For a monoenergetic beam the HVL is simply ln 2 / μ; for the polychromatic beam it is found by bisection on the transmitted-kerma integral. Added filtration lowers the skin dose much more than the useful dose at the detector.
5. Dose and quanta. The free-in-air output is calibrated to 45 µGy per mAs at 1 m for 80 kVp and 2.5 mm Al total filtration (a typical figure) and scales with the spectrum, the mAs and the inverse square of distance. Air kerma weighting uses the mass energy-absorption coefficient of air from the same cross-section model. The number of photons per mm2 follows from N = K / (E μen/ρ). Photon counts per 0.4 mm detector pixel are multiplied by the CsI absorption (0.6 mm), and the image noise is the Poisson value √N.
6. Contrast, scatter, noise. Subject contrast of a detail is C = (Sbg - Sdetail) / Sbg and the contrast-to-noise ratio is CNR = (Sbg - Sdetail) / √Sbg. Scattered photons add a smooth offset to both, which reduces contrast by 1 / (1 + SPR). The scatter-to-primary ratio is modelled as 0.13 per cm of soft tissue; a grid cuts scatter to a fifth but also removes about a third of the primary photons, so the dose must rise to keep the same signal (the grid option here keeps your mAs, so the picture gets noisier). The right-hand graph keeps the signal behind the patient constant while the voltage changes (like automatic exposure control).
Checks (run in the page). (1) Klein-Nishina cross-section at 100 keV and 1 MeV against the published 0.4927 b and 0.2112 b, and the Thomson limit; (2) the numerical sum of the Kramers continuum against its analytic integral; (3) the highest photon energy equals the tube voltage; (4) the bisection HVL of a monoenergetic beam equals ln 2 / μ; (5) μ/ρ of water at 50 keV and aluminium at 30 keV against reference data; (6) the HVL grows by more than 30 percent when 3 mm Al is added; (7) the output is the calibrated 45 µGy/mAs; (8) the inverse-square law.
Simplifications. The target self-absorption (anode heel effect) and electron backscatter are not modelled, nor are focal spot blur, the detector's modulation transfer function or electronic noise. The phantom is a simple hand model with a constant bone and soft-tissue density; the image noise is drawn at the detector's native pixel size. Numbers are for teaching, not for clinical dose estimates. All X-ray exposure shown is simulated: nobody is exposed.