def transformation_to_normal(eq):
 (var, coeff, diop_type) = classify_diop(eq, _dict=False)
 if (diop_type in ('homogeneous_ternary_quadratic', 'homogeneous_ternary_quadratic_normal')):
  return _transformation_to_normal(var, coeff)

def transformation_to_normal ( eq ) : ( var , coeff , diop_type ) = classify_diop ( eq , _dict = False ) if ( diop_type in ( 'homogeneous_ternary_quadratic' , 'homogeneous_ternary_quadratic_normal' ) ) : return _transformation_to_normal ( var , coeff )
returns the transformation matrix that converts a general ternary quadratic equation eq to a form without cross terms: ax^2 + by^2 + cz^2 = 0 .