def parametrize_ternary_quadratic(eq):
 (var, coeff, diop_type) = classify_diop(eq, _dict=False)
 if (diop_type in ('homogeneous_ternary_quadratic', 'homogeneous_ternary_quadratic_normal')):
  (x_0, y_0, z_0) = _diop_ternary_quadratic(var, coeff)
  return _parametrize_ternary_quadratic((x_0, y_0, z_0), var, coeff)

def parametrize_ternary_quadratic ( eq ) : ( var , coeff , diop_type ) = classify_diop ( eq , _dict = False ) if ( diop_type in ( 'homogeneous_ternary_quadratic' , 'homogeneous_ternary_quadratic_normal' ) ) : ( x_0 , y_0 , z_0 ) = _diop_ternary_quadratic ( var , coeff ) return _parametrize_ternary_quadratic ( ( x_0 , y_0 , z_0 ) , var , coeff )
returns the parametrized general solution for the ternary quadratic equation eq which has the form ax^2 + by^2 + cz^2 + fxy + gyz + hxz = 0 .