# Problem handling coordinates in tikzpictures [closed]

I'm trying to draw some points with TikZ.

I'm using this code:

\begin{tikzpicture}[scale=0.5]
\draw (4.0,2.4492) -- (4.8984,-4.0);
\draw (4.0,2.4492) -- (-4.0,-7.347);
\draw (4.0,2.4492) -- (-9.796,4.0);
\draw (4.8984,-4.0) -- (-4.0,-7.347);
\draw (4.8984,-4.0) -- (-9.796,4.0);
\draw (-4.0,-7.347) -- (-9.796,4.0);
\end{tikzpicture}


I'm generated this code with a Python program using OpenGL. In my render all this are done perfectly: a perfect square with diagonals, but in latex with TikZ I'm getting the first point of the square not aligned (sorry i can't post images yet). Some helps?

Added an image for you (with grid and origin marked):

-
Your code seems to be ok. As I see it TikZ simply draws what you request. No idea, why it gives you are different result in the OpenGL renderer. My guess it you export the coordinates in a wrong way. –  Martin Scharrer Mar 27 '11 at 11:36
thanks for the image! –  nkint Mar 27 '11 at 14:35
i resolved! i was stucking on exporting 1.2246063538223773e-16 as 1.22 and other similar error. thanks to point me in better examing coordinates throug grid! –  nkint Mar 27 '11 at 16:06
Then I guess we can close this. @Martin: Do you want to add an answer? –  Caramdir Mar 27 '11 at 16:20
@Caramdir: No, I don't. (But I already thought about some rounding/conversion error as cause.). I will close it now as suggested. –  Martin Scharrer Mar 27 '11 at 16:24