x1(u,v)=cos(u)+.5*cos(u)*cos(v) y1(u,v)=sin(u)+.5*sin(u)*cos(v) z1(u,v)=.5*sin(v) x2(u,v)=1+cos(u)+.5*cos(u)*cos(v) y2(u,v)=.5*sin(v) z2(u,v)=sin(u)+.5*sin(u)*cos(v) # set style line 100 lw 0.1 lc rgb "navy" set pm3d depthorder hidden3d ls 100 set palette defined (0 "dark-green", 1 "white") set parametric set urange [0:2*pi] set vrange [-pi:pi] set samples 48 set isosamples 48,24 set view 60,15,1.2 unset key set ticslevel 0 splot x1(u,v), y1(u,v), z1(u,v) w pm3d,\ x2(u,v), y2(u,v), z2(u,v) w pm3d pause 3 set term pngcairo size 480,480 set output "tori.png" replot |