2 # $Id: surface2.dem,v 1.4 1999/10/17 19:17:01 lhecking Exp $
9 set title "Parametric Sphere"
10 set urange [-pi/2:pi/2]
12 set ztics nomirror -1.0,0.25,1.0
14 splot cos(u)*cos(v),cos(u)*sin(v),sin(u)
15 pause -1 "Hit return to continue (1)"
18 set title "Parametric Sphere, crunched z axis"
20 pause -1 "Hit return to continue (2)"
23 set title "Parametric Sphere, enlarged z axis"
25 pause -1 "Hit return to continue (3)"
29 set title "Parametric Torus"
32 set zrange [-1:1] # imitate old 'set view' hack
33 splot (1-0.2*cos(v))*cos(u),(1-0.2*cos(v))*sin(u),0.2*sin(v)
34 pause -1 "Hit return to continue (4)"
37 set title "Parametric Hexagon"
41 set ticslevel 0. # reserve more space z direction.
42 set view ,,0.7,1.4 # crunch xyz, and re-extend z back to full size
44 splot cos(v)**3*cos(u)**3,sin(v)**3*cos(u)**3,sin(u)**3
45 pause -1 "Hit return to continue (5)"
49 set title "Parametric Helix"
54 splot (1-0.1*cos(v))*cos(u),(1-0.1*cos(v))*sin(u),0.1*(sin(v)+u/1.7-10)
55 pause -1 "Hit return to continue (6)"
58 set title "Parametric Shell (clipped to limited z range)"
64 splot cos(u)*u*(1+cos(v)/2),sin(v)*u/2,sin(u)*u*(1+cos(v)/2)
65 pause -1 "Hit return to continue (7)"
68 set title "Parametric Shell (automatic z range)"
70 pause -1 "Hit return to continue (8)"
72 set title "Interlocking Tori"
77 splot cos(u)+.5*cos(u)*cos(v),sin(u)+.5*sin(u)*cos(v),.5*sin(v) with lines, \
78 1+cos(u)+.5*cos(u)*cos(v),.5*sin(v),sin(u)+.5*sin(u)*cos(v) with lines
79 pause -1 "Hit return to continue (9)"