1

I'm trying to plot a elliptic curve in a projective Space. I got inspired by this thread. Here one can find the code.

Now the point is, that the author of the thread only plotted a 2d Version of an elliptic curve. I wanted to plot this 3d equation: z*y^2=x^3-3*x*z^2+3*z^3 ( This is the projective form of the affin equation y^2 = x^3 -3x + 3 )

It already was a big problem to find plotters only, that can handle this. I finally got this result:enter image description here

Can someone help me plotting this with using tikz?

  • So you already have the result!? From where. Show your code, and you also need to try to do it in TikZ - and show the code - otherwise it is impossible to know what you need help with. – hpekristiansen May 11 at 16:29
  • I made the plot with this. But i have no idea how to plot it with tikz. I already plotted elliptic curves with commands like \addplot [] {-sqrt((x^3+3*x+3))}; I have no idea to plot such complex equations as mentioned above. – Titanlord May 11 at 16:33
  • 1
    For such complex 3D plots, asymptote may be more appropriate – BambOo May 11 at 16:38
  • @BambOo is it possible with gnuplot, too? If yes, does someone has a tipp for me, how to plot 3d polynoms of the form f(x,y,z) = ... ? – Titanlord May 11 at 16:41
  • I do not know how to use neither gnuplot nor asymptote, it is just a suggestion – BambOo May 11 at 16:48
3

This isn't tikz, it's the graphics from a computer algebra system, SAGE. If you're going to consider gnuplot or asymptote then it makes sense to consider SAGE. The coding is simple to do:

\documentclass{article}
\usepackage{graphicx}
\usepackage{sagetex}
\begin{document}
\begin{sagesilent}
var("y,z")
F = z*y^2-x^3+3*x*z^2-3*z^3
p = implicit_plot3d(F, (x,-2,2), (y,-2,2), (z,-2,2), color='palevioletred')
\end{sagesilent}
The elliptic curve $\sage{F}$ can be plotted using SAGE:
\begin{center}
\sageplot[width=4in][pdf]{p, frame=True}
\end{center}
\end{document}

The output from Cocalc is: enter image description here

SAGE is not part of your LaTeX distribution so it needs to be installed on your machine and linked to LaTeX, which can sometimes be tricky. Another way is through a free Cocalc account. You can find more information about the sagetex package, which allows you to put SAGE code into your LaTeX document, here. Installing SAGE on your computer gives you a SAGE notebook to run your code. It's like the Sage Cell Server I commented on above, with a little more functionality.

enter image description here

After clicking on the circle in the bottom left hand corner, a right click on the figure will bring up the options menu. This will let you add axes, chage colors, export the file, and so on. You can rotate the figure and pick the angle that suits you before exporting the picture.

By default, the graphics are framed in a 3d box. Changing True to False in the LaTeX code I've posted will remove the frame and numbers, leaving only the surface.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.