Affine[g_,{var1_,var2_,var3_}]:=g/.{var1->1,var2->X,var3->Y}
Jac[f_]:=D[f,{{X0,X1,X2}}]
Hess[f_]:=Det[D[Jac[f],{{X0,X1,X2}}]]
AffineDis[f_,{var1_,var2_,var3_}]:=ContourPlot[Affine[f,{var1,var2,var3}]==0,{X,-2,2},{Y,-2,2},PlotPoints->100]

Lun[g_,x_]:=Exponent[g,x]
Coeff[g_,x_]:=Reverse[CoefficientList[g,x]]
EulerSylvester[f_,g_,x_]:=
Join[
Table[
PadRight[
Coeff[f,x],
Lun[f,x]+Lun[g,x],0,i],{i,0,Lun[g,x]-1}],
Table[
PadRight[
Coeff[g,x],
Lun[f,x]+Lun[g,x],0,i],{i,0,Lun[f,x]-1}]]

Resul[f_,g_,x_]:=Det[EulerSylvester[f,g,x]]

Poly[x_,n_]:=Table[x^j,{j,0,n}].Table[(Subscript[a, n-j]),{j,0,n}]

Duale[f_,{X0_,X1_,X2_}]:=Resultant[
ξ(Affine[Jac[f],{X0,X1,X2}]/.{Y->((-(1+ξ X))/η)})[[1]]-(Affine[Jac[f],{X0,X1,X2}]/.{Y->((-(1+ξ X))/η)})[[2]],
η(Affine[Jac[f],{X0,X1,X2}]/.{Y->((-(1+ξ X))/η)})[[1]]-(Affine[Jac[f],{X0,X1,X2}]/.{Y->((-(1+ξ X))/η)})[[3]],
X]//Factor//Numerator
<<ComputationalGeometry`
<<Combinatorica`
test[x_]:=Element[x,Rationals]
NewtonL[f_]:=Table[{i,Select[Exponent[CoefficientList[f,y],x],test][[i]]},{i,1,Length[Select[Exponent[CoefficientList[f,y],x],test]]}]
NewtonP[f_]:=Show[ListPlot[NewtonL[f],PlotStyle->PointSize[.02],Filling->Axis,PlotRange->{{0,Max[Exponent[f,x],Exponent[f,y]]+1},{0,Max[Exponent[f,x],Exponent[f,y]]+1}}],Graphics[{Opacity[.2],Polygon[Permute[NewtonL[f],ConvexHull[NewtonL[f]]]]},AspectRatio->1]]