orth_polynomial_code function

Use orthogonal polynomial coding