Formation of diamond and graphite at high pressure using glassy carbon source