I am using the general form of a second-degree plane curve:
$$Ax^2+2Bxy + Cy^2+2Dx + 2Ey + F = 0$$
I want to randomly generate plane curves of this form, so I am using RandomReal[{-1,1},6]
to
generate the coefficients. I made the above equation into a function:
SecondDegreeCurve[{a_, b_, c_, d_, e_, f_}, x_, y_] :=
a x^2 + 2 b x y + c y^2 + 2 d x + 2 e y + f == 0
However, when I try to plug the composition
ContourPlot[
SecondDegreeCurve[RandomReal[{5}, 6], x, y],
{x, -2, 2}, {y, -2, 2}]
into ContourPlot
, the image comes back blank.
When I run SecondDegreeCurve[RandomReal[{5}, 6], x, y]
, I get something like the following output:
1.4557 + 5.20582 x + 1.29609 x^2 + 9.37565 y + 6.73248 x y + 1.84528 y^2 == 0
and when I plug this into ContourPlot
, the curve is displayed.
My question is, what is it about the initial composed expression that doesn't display the curve?