# Tag Info

3

I've come up with a different idea so simple I might describe it as stupid; I just make two files, a .mf and a .mp, and let kpathsea do the rest (names subject to change pending your suggestions): % ismetapost.mf: Companion to ismetapost.mp % If we were MetaPost, we would have read the other file, so ... boolean is_metapost; is_metapost := false; % ...

7

I use boolean metapost; if known color Wolfgang Amadeus Mozart: metapost:=true; else: metapost:=false; fi The explanation: under Metafont, color Wolfgang Amadeus Mozart will be an unknown numeric since color is not a Metafont keyword. But in MetaPost, Wolfgang Amadeus Mozart will be an unknown numeric and therefore not a color. Thus color Wolfgang ...

3

Asymptote can plot an implicitly defined surface if you insist on doing it that way: settings.outformat = "png"; settings.render = 16; size(8cm); import contour3; currentprojection=perspective(3*(4,-6,3)); real f(real v, real u, real x) { return 4x^3 + 2u*x + v; } draw(surface(contour3(f, (-2,-2,-2), (2,2,2), nx=40)), ...

4

\documentclass[pstricks]{standalone} \usepackage{pst-solides3d} \begin{document} \begin{pspicture}(-4,-6)(5,9) \psset{viewpoint=100 30 40 rtp2xyz,lightsrc=viewpoint, Decran=120} \psSurface[ngrid=.15 .15,incolor=yellow,hue=0 1,linewidth=0.1\pslinewidth, algebraic,axesboxed](-1,-2)(1,2){ 4*x^3 - 2*y*x} \end{pspicture} \end{document} The z max/min ...

7

You can actually do this via pgfplots but to make it a little nicer you have to switch to LuaLaTeX since PDFLaTeX chokes up on memory limitations (due to many samples per axis. You don't need that much but why not :P). \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.10} \begin{document} \begin{tikzpicture} \begin{axis}[y domain=-4:4, ...

5

I think what you are asking for it is precisely in ePiX's, (http://bay.uchicago.edu/tex-archive/graphics/epix/samples/butterfly.xp) examples. If I understand the code, the strategy is to draw the surface in three patches. It would be fun to translate this into pgfplots and asymptote. Maybe asymptote can even define this curve implicitly (it is very good at ...

7