[Tex/LaTex] Contour plot of arbitrary R^3 function without gnuplot

pgfplots

Is there a way to make pretty contour plots of arbitrary functions in R^3, like the one below for example, without the use of the gnuplot contour-stuff?

The reason I'm asking is I prefer a simple setup of the TeX environment, and since gnuplot isn't included in the Mactex bundle, and requires some adjustments to command line calls etc. I prefer to just solve things with what's available, if feasibly possible.

One obvious way would be to manually calculate the contours, but I saw this solution below and really liked that it took a single function for the surface and produced the contours on its own.

Contour plot

URL: How to coherently combine 3D and contour plots with pgfplots

Best Answer

pgfplots currently supports contour plots if they are either precomputed by means of some external program (contour prepared) or it can invoke an external tool to compute them as in contour gnuplot.

An implementation to compute the contours in TeX was attempted, but the contributor had to pursue his studies and could not finish it.

Means: No, this is currently impossible with pgfplots.

That means: pgfplots has to resort to gnuplot or "some other suitable external tool".

If someone would like to implement a contouring algorithm in, say, Lua, one could also integrate that.