How are ultraviolet rays and gamma rays produced?