3

Is it possible to draw a 3d plot as line art with tikz? For example, Is it possible to draw z=x*exp(-x^2-y^2) with smooth line art style? Something like the following figure for z=x^3-3x*y^2. enter image description here

1 Answers1

2

Asymptote is probably the better tool for serious 3d functions:

enter image description here

import graph3;
size(200,0);
currentprojection=perspective(10,8,9);
real f(pair z) {return z.x*exp(-(z.x**2)-(z.y**2));}
surface s=surface(f,(-1.4,-1.4),(1.4,1.4),nx=20,Spline);
draw(s,lightgray,meshpen=black+thick(),nolight,render(merge=true));

If you have a full TeX installation, then it will be already installed. texdoc asy tells you how to run it, and then if you do asy to bring up the interactive prompt, typing help will open the manual. It's very powerful but there is a lot to learn.

As the relevant help page will tell you, asy can be integrated into your LaTeX source file.

Thruston
  • 42,268