The formation of diamond