set pm3d depth lighting primary 0.5  
set object rect from sc 0,0 to sc 1,1 behind fc "#114400"
set palette defined (0 "#cc8833", 1 "#cc8833")
set samples 128
set isosamples 64
unset border
unset tics
unset colorbox
unset key
set xyplane 0
set view 60, 15, 1.8
set term pngcairo size 360,360
set out "torus001.png"
set parametric
set urange [0:2*pi]
set vrange [-pi:pi]
R = 1
a(x) = 0.2*(1+0.4*cos(8*x))
c = R + 1.4*0.2
set xrange [-c:c]
set yrange [-c:c]
set zrange [-c:c]

x(u,v) = cos(u)*(R + a(u)*cos(v))
y(u,v) = sin(u)*(R + a(u)*cos(v))
z(u,v) = a(u)*sin(v)

splot x(u,v), y(u,v), z(u,v) w pm3d
!display "torus001.png"