The X-rays used for radiation therapy, medical imaging and many other applications are produced by slamming an electron beam into a piece of metal.