1

Is it possible to use equations to draw geometric objects like spheres or planes in LaTeX, using TikZ maybe?

It may be parametrized.

Thank you!

  • 5
    pgfplots.sourceforge.net/gallery.html \begin{tikzpicture} \begin{axis}[ xlabel=$x$, ylabel={$f(x) = x^2 - x +4$} ] % use TeX as calculator: \addplot {x^2 - x +4}; \end{axis} \end{tikzpicture} – Jérôme Dequeker Dec 15 '15 at 12:30
  • Or read the section of the TikZ manual on plotting functions? (pgfplots may be more powerful - not sure.) – cfr Dec 15 '15 at 22:20
  • Consider asymptote, an external program with C-like syntax in which you write equations to define lines/surfaces – vonbrand Jan 14 '16 at 0:04
1

You can do it simply by using pgfplots package. Here are some examples added in one plot. You may use your own functions or the options you prefer to be included in your plot. Just read the package's instructions document. This package is great.

%pdfLateX

\documentclass{standalone}
\usepackage{pgfplots}

\begin{document}
\begin{tikzpicture}
\begin{axis}
\addplot3[surf]{x};
\addplot3[surf]{x^2+y^2};
\end{axis}
\end{tikzpicture}

\end{document}

enter image description here

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.