There is a conic-section with this implicit form:
$$ f(x,y) = ax^2 + 2bxy + cy^2 + 2dx + 2ey + f = 0 $$
I would like to write a program, which draws it, but I have no idea where to start. I could use a brute-force method, calculate it for each pixel, and the point is on the curve, if the value is around zero. But I am looking for a better solution.
$$ax^2 + 2bxy + cy^2 + 2dx + 2ey + f = 0 $$ $$cy^2 + 2(bx + e)y + (ax^2 + 2dx + f) = 0 $$ $$y_1(x)=\frac{(bx+e)+\sqrt{(bx+e)^2-c(ax^2 + 2dx + f)}}{c}$$ $$y_2(x)=\frac{(bx+e)-\sqrt{(bx+e)^2-c(ax^2 + 2dx + f)}}{c}$$ Draw successively the two functions. The whole is $y(x)$.
You can scan point after point the considered range of $x$. If $(bx+e)^2-c(ax^2 + 2dx + f)>0$ compute $y$ and plot $(x,y)$. If not, of course don't compute $y$ nor plot it.