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 18 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 set term pngcairo size 360,360 background rgb "#114400" do for [i = 0:N-1] { set out sprintf("helix%03d.png",i) 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 } system("convert -adjoin -delay 10 helix*.png torushelix1.gif") system("rm helix*.png") |