Optical Millimeter-Wave and Terahertz Generation by