Does conic-section has a parametric form? Is it possible to draw it using the implicit form?

301 Views Asked by At

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.

3

There are 3 best solutions below

2
On BEST ANSWER

$$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.

0
On

For the General Parabola $$(Ax+Cy)^2+Dx+Ey+F=0$$ a possible parametric form is

$$\color{red}{\left(\frac {Ct^2-Et+CF}{AE-CD}, -\frac{At^2-Dt+AF}{AE-CD}\right)}$$

See this answer here.

Equating coefficients with the form of the general conic given in the question, i.e. $$ax^2+2bxy+cy^2+2dx+2ey+f=0$$ gives $$a=A^2\\ b=AC\\ c=C^2\\ d=\frac D2\\ e=\dfrac E2\\ f=F$$

0
On
a = 3; b = 2; h = 2; k = 1; (* Ellipse *)
x[u_, v_] = (a Cos[u] + h) Cos[v] - (b Sin[u] + k) Sin[v]
    y[u_, v_] = (a Cos[u] + h) Sin[v] + (b Sin[u] + k) Cos[v]
ParametricPlot[{x[u, v], y[u, v]}, {u, 0, 2 Pi}, {v, 0, 2 Pi}]
(* Hyperbola *)
x[u_, v_] = (a Cosh[u] + h) Cosh[v] - (b Sinh[u] + k) Sinh[v]
    y[u_, v_] = (a Cosh[u] + h) Sinh[v] + (b Sinh[u] + k) Cosh[v]
ParametricPlot[{x[u, v], y[u, v]}, {u, -1, 1}, {v, 0, 2 Pi}]

from Mathematica, did not Latex it for clarity..

Conics with principal axes parallel to coordinate axes $u$ generator circle rotation and $v,$ the rigid conic rotation.

For hyperbolic cases added $h$, $ \cos \rightarrow \cosh ..$