x(u,v)= cos(u)*(cos(u/2)*cos(v)+sin(u/2)*sin(2*v)+3.0)
y(u,v)= -sin(u)*(cos(u/2)*cos(v)+sin(u/2)*sin(2*v)+3.0)
z(u,v)= -sin(u/2)*cos(v)+cos(u/2)*sin(2*v)  
#
set style line 100 lw 0.05 lc rgb "navy"
set pm3d depthorder hidden3d ls 100
set palette rgb 3,7,9
set parametric
set ticslevel 0
unset key
set isosamples 40
set view 40,70,1.2
set urange [-0.5*pi:1.5*pi]
set vrange [-pi:pi]
set zrange [-2:2]
splot x(u,v),y(u,v),z(u,v) w pm3d
pause 3
set term pngcairo size 480,480
set out "klein.png"
replot