2

I want to draw a nodal curve with tikz, that is the curve parametrized by x(t) = t^2 - 1 and y(t) = t^3 - t. To do this, I tried the code

\begin{tikzpicture}
    \draw [style = help lines, step = 0.5] (-1, -1) grid (1, 1);
    \draw [domain = -1.2:1.2, samples=40, variable=\t] plot ({\t^2 - 1}, {\t^3 - \t});
\end{tikzpicture}

but what I get is

the supposed curve, but the second half is mirrored

So it seems like the part in the interval -1.2:0 is mirrored, but I don't see what went wrong. I get the correct picture if I split the interval at 0, and use the lines

\draw [domain = -1.2:0, samples=40, variable=\t] plot ({-1 - \t^2}, {\t^3 - \t});
\draw [domain = 0:1.2, samples=40, variable=\t] plot ({\t^2 - 1}, {\t^3 - \t});

With that I get what I expect, but it fells incredibly hacky:

picture of the correct curve

What did I do wrong here? Or did I run into some bug? Note that I still use Texlive 2017, which is included with Ubuntu 18.04.

Stefan Pinnow
  • 29,535
red_trumpet
  • 995
  • 1
  • 6
  • 17

0 Answers0