I am writing a program which needs to sample one point from a second degree bivariate curve of the form:
$$ Ax^2 + Bx + Cy^2 + Dy + Exy + F = 0 $$
To get this sample point I only need to feed a value of $x$ to the formula, but I have to make sure it's in the domain of course. The problem is the coefficients are unknown and have to be evaluated at run time.
So, is there a formula for calculating the domain (or range)?
Once you choose an $x$, what's left is a quadratic equation in $y$. The discriminant of that equation is $$ \tag{1} \Delta_x =(D+Ex)^2-4C(Ax^2+Bx+F)$$ which rearranges to a quadratic polynomial in $x$: $$ \tag{2} \Delta_x = (E^2-4AC)x^2 + (2DE-4BC)x + (D^2-4CF) $$ You can use the quadratic formula on $(2)$ to find the out which ranges of $x$ make $\Delta_x$ nonnegative.