set term gif animate delay 10 size 360,360 background rgb "#114400"\
 font "/usr/share/fonts/TrueType-dejavu/DejaVuSansCondensed.ttf,10"
set out "torushelix.gif"
set style line 100 lw 0.05 lc rgb "#663300"
set pm3d depth lighting hidden3d ls 100 
set xyplane 0
unset key
unset tics
unset border
unset colorbox
set samples 384
set isosamples 16
set xr [-2:2]
set yr [-2:2]
set zr [-2:2]
set view equal xyz
set view 72,218,2.2
set palette defined ( 0 "#ffcc66", 1 "#ffcc66")

R = 2.0
r = 0.5
al = 3.0
bt = -7.0
s = 0.1

set parametric
set ur [0:pi]
set vr [0:2*pi]
set xr [-2.5:2.5]
set yr [-2.5:2.5]
set zr [-2.5:2.5]
fx(u,t) = ((R+r)/2 + (R-r)/2*cos(al*u + t))*cos(bt*u)
fy(u,t) = ((R+r)/2 + (R-r)/2*cos(al*u + t))*sin(bt*u)
fz(u,t) = (R-r)/2 * sin(al*u + t)

N = 20
do for [i = 0:N-1] {
  t = i * 2.0*pi/N/7
  splot fx(2*u, t) + s*sin(v), fy(2*u, t) + s*sin(v),\
        1.5*fz(2*u, t) + s*cos(v) w pm3d
}