# Hyperbola? conics? [closed]

I use Geogebra to draw by five knowing points on a plane an hyperbol. Then I used the intern command to translate into tikz code my figure. I create a file source code latex/tikz, but after compilation (pdfLaTeX), points are drawing, but not the correct hyperbola trough the fives points.

Question : Someone know how to draw a simplest conic by five points directly in TikZ source? I can I draw an hyperbol if I know only the f(x,y)=0 equation?

Thank for this studies ! D. Collin % % % % The code generate by export pgf/TikZ is :

    % ---------
\documentclass[10pt]{article}
\usepackage{pgf,tikz}
\usetikzlibrary{arrows}
\pagestyle{empty}
\begin{document}
\definecolor{xdxdff}{rgb}{0.4902,0.4902,1}
\definecolor{zzqqzz}{rgb}{0.6,0,0.6}
\definecolor{qqzzqq}{rgb}{0,0.6,0}
\definecolor{uququq}{rgb}{0.25098,0.25098,0.25098}
\definecolor{ffqqtt}{rgb}{1,0,0.2}
\definecolor{qqqqff}{rgb}{0,0,1}
\begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]
\clip(-6,-6) rectangle (6,6);
\draw[line width=0.4pt] (-3.24171,-0.87914) -- (-3.16257,-0.72086) -- (-3.32086,-0.64171) -- (-3.4,-0.8) -- cycle;
\draw[line width=0.4pt] (-2.70156,-2.99384) -- (-2.67081,-2.81957) -- (-2.84508,-2.78881) -- (-2.87584,-2.96309) -- cycle;
\draw[line width=0.4pt] (0.37519,-4.37497) -- (0.35016,-4.19978) -- (0.17497,-4.22481) -- (0.2,-4.4) -- cycle;
\draw[line width=0.4pt] (2.71507,-4.46302) -- (2.56435,-4.37027) -- (2.4716,-4.52098) -- (2.62232,-4.61373) -- cycle;
\draw [samples=50,domain=-0.99:0.99,rotate around={-157.68231:(-4.98202,-2.15901)},xshift=-4.98202cm,yshift=-2.15901cm,line width=2pt,color=ffqqtt] plot ({2.47764*(1+\x^2)/(1-\x^2)},{1.88916*2*\x/(1-\x^2)});
\draw [samples=50,domain=-0.99:0.99,rotate around={-157.68231:(-4.98202,-2.15901)},xshift=-4.98202cm,yshift=-2.15901cm,line width=2pt,color=ffqqtt] plot ({2.47764*(-1-\x^2)/(1-\x^2)},{1.88916*(-2)*\x/(1-\x^2)});
\draw [line width=1.2pt,color=qqqqff] (-1,4)-- (-2,2);
\draw [line width=1.2pt,color=qqqqff] (-2,2)-- (-2.6,-1.4);
\draw [line width=1.2pt,color=qqqqff] (-2.6,-1.4)-- (0,-3);
\draw [line width=1.2pt,color=qqqqff] (0,-3)-- (-1,4);
\draw [line width=1.2pt,dash pattern=on 2pt off 2pt,color=qqzzqq] (3,-4)-- (-3.4,-0.8);
\draw [line width=1.2pt,dash pattern=on 2pt off 2pt,color=qqzzqq] (3,-4)-- (2.62232,-4.61373);
\draw [line width=1.2pt,dash pattern=on 2pt off 2pt,color=zzqqzz] (3,-4)-- (0.2,-4.4);
\draw [line width=1.2pt,dash pattern=on 2pt off 2pt,color=zzqqzz] (3,-4)-- (-2.87584,-2.96309);
\draw [dash pattern=on 2pt off 2pt,color=qqqqff] (-2,2)-- (-3.71193,-1.42386);
\draw [dash pattern=on 2pt off 2pt,color=qqqqff] (-2.6,-1.4)-- (-3.11831,-4.33711);
\draw [dash pattern=on 2pt off 2pt,color=qqqqff] (0,-3)-- (0.27455,-4.92186);
\draw [dash pattern=on 2pt off 2pt,color=qqqqff] (0,-3)-- (3.39975,-5.09215);
\fill [color=qqqqff] (-1,4) circle (1.5pt);
\draw[color=qqqqff] (-1.14371,4.25851) node {$M_1$};
\fill [color=qqqqff] (-2,2) circle (1.5pt);
\draw[color=qqqqff] (-2.07806,2.2897) node {$M_2$};
\fill [color=qqqqff] (-2.6,-1.4) circle (1.5pt);
\draw[color=qqqqff] (-2.77882,-1.36427) node {$M_3$};
\fill [color=qqqqff] (0,-3) circle (1.5pt);
\draw[color=qqqqff] (0.30787,-2.78248) node {$M_4$};
\fill [color=qqqqff] (3,-4) circle (1.5pt);
\draw[color=qqqqff] (3.27776,-3.70015) node {$M_5$};
\fill [color=uququq] (0.2,-4.4) circle (1.5pt);
\draw[color=uququq] (-0.02583,-4.35086) node {$H_{14}$};
\fill [color=uququq] (-2.87584,-2.96309) circle (1.5pt);
\draw[color=uququq] (-3.0291,-2.83254) node {$H_{23}$};
\fill [color=uququq] (2.62232,-4.61373) circle (1.5pt);
\draw[color=uququq] (2.56032,-4.70124) node {$H_{34}$};
\fill [color=uququq] (-3.4,-0.8) circle (1.5pt);
\draw[color=uququq] (-3.49627,-0.46329) node {$H_{12}$};
\fill [color=xdxdff] (4.0018,-4.30299) circle (1.5pt);
\draw[color=xdxdff] (4.11201,-4.0839) node {$E$};
\fill [color=xdxdff] (-0.46313,5.00435) circle (1.5pt);
\draw[color=xdxdff] (-0.64317,5.19286) node {$F$};
\end{tikzpicture}
\end{document}
%----------

-

## closed as too localized by hpesoj626, Paul Gaborit, Kurt, Martin Schröder, lockstepFeb 23 '13 at 0:27

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. If this question can be reworded to fit the rules in the help center, please edit the question.

If you provide the mathematical description of the function given the points then it is TeX question. Otherwise this seems more a math question so might be more appropriate at Math.SE. –  Peter Grill Feb 22 '13 at 19:09
Sorry, but TikZ don't draw correctly the hyperbola with the code generated by geogebra... So, how I can draw correctly the hyperbola passing through this five points with a simple Tikz code?... –  DK06100 Feb 22 '13 at 21:13
That seems to be an issue with GeoGebra, tikz/pgfplots would most likely do a great job but do need either a function of a algorithm to compute the points that are to be graphed. So, once the math is done, then the drawing can begin. –  Peter Grill Feb 22 '13 at 21:17
Can you post / upload somewhere the code GeoGebra outputs? Then it can be tested whether the mistake is on GeoGebra site or LaTeX site. And if on GeoGebra, we can find what does it do wrong. –  yo' Feb 22 '13 at 21:22
I have Geogebra 4.2.7.0 installed in Ubuntu 12.10 and exported to tikz a hyperbola drawn using "Conic through Five Points" and compiled the output. It behaves okay in my setup. And I think Geogebra is now on a newer version. Perhaps an update is required? I also second the suggestion that you post the code produced by Geogebra. I have not seen a question regarding a conic passing through five points using tikz in this site. And perhaps you can revise your question along that line, since your question seems off-topic at the moment . –  hpesoj626 Feb 22 '13 at 21:34