# Tikz picture: Volume between two surfaces

I would like to draw such a picture in Tikz, especially to emphasize the volume between these two paraboloids. Since Tikz looks quite complicated to me I ask you for some help (not to present me the code on a silver tray) how to tackle my problem.

I appreciate any constructive help :)

Thank you!

• Graphs of functions usually use data visualization. The added text is done by placing a node at the desired location, possibly as \node[below] at (visualization cs: x,y) {\$x^2+y^2\$}; where (x,y) is given in graph coordinates. The elliptical arcs should be straight foreward, but the shading might prove difficult. Perhaps you could clip a spherical shading. Commented Jul 27, 2016 at 17:16
• If you've never used TikZ before, start with a simpler picture or work through some of the tutorials in the manual. Otherwise, you'll just get frustrated and give up. (At least, I would - maybe you have a will with higher iron content than me!)
– cfr
Commented Aug 7, 2016 at 2:54

Maybe like this using Asymptote.

``````settings.outformat="pdf";
settings.render = 16;
settings.prc = false;
import three;
import graph3;

size(8cm,8cm,IgnoreAspect);

currentprojection = orthographic(2,0.2,1);

label("\$8 - (x^2 + y^2)\$",(0,0,9));
label("\$x^2 + y^2\$",(0,0,-1));

pen color = red;
material pen1 = material(diffusepen=color+opacity(1.0), emissivepen=0.5*color);
pen color = blue;
material pen2 = material(diffusepen=color+opacity(0.4), emissivepen=0.8*color);

real f1(pair z) { return 8-(z.x*z.x+z.y*z.y); }
real f2(pair z) { return z.x*z.x+z.y*z.y; }

real x(real t) { return 2.0*cos(2pi*t); }
real y(real t) { return 2.0*sin(2pi*t); }
real z(real t) { return 4.0; }
path3 p=graph(x,y,z,0,1,operator ..);

draw(p);

surface surf1 = surface(f1,(-2,-2),(2,2),50,Spline);
draw(surf1,surfacepen=pen1);
surface surf2 = surface(f2,(-2,-2),(2,2),50,Spline);
draw(surf2,surfacepen=pen2);

xaxis3("\$x\$",Bounds,InTicks);
yaxis3("\$y\$",Bounds,InTicks);
zaxis3("\$z\$",Bounds,InTicks);

shipout(scale(4.0)*currentpicture.fit());
``````