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 "#6666ff", 1 "#6666ff") 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 "torus003.png" set parametric set urange [0:2*pi] set vrange [-pi:pi] R = 1 a(x) = 0.2*(1 + 0.5*cos(2*x+pi)) c = R + 0.2 set xrange [-c:c] set yrange [-c:c] set zrange [-c:c] x(u,v) = cos(u)*(R + a(v)*cos(v)) y(u,v) = sin(u)*(R + a(v)*cos(v)) z(u,v) = a(v)*sin(v) splot x(u,v), y(u,v), z(u,v) w pm3d !display "torus003.png" |