Icons are changed
[gnuplot] / demo / surface2.dem
1 #
2 # $Id: surface2.dem,v 1.4 1999/10/17 19:17:01 lhecking Exp $
3 #
4 set parametric
5 set isosamples 50,10
6 set hidden
7 set key below
8
9 set title "Parametric Sphere"
10 set urange [-pi/2:pi/2]
11 set vrange [0:2*pi]
12 set ztics nomirror -1.0,0.25,1.0
13 set view 45,50
14 splot cos(u)*cos(v),cos(u)*sin(v),sin(u)
15 pause -1 "Hit return to continue (1)"
16
17 set view ,,,0.7
18 set title "Parametric Sphere, crunched z axis"
19 replot
20 pause -1 "Hit return to continue (2)"
21
22 set view ,,,1.4
23 set title "Parametric Sphere, enlarged z axis"
24 replot
25 pause -1 "Hit return to continue (3)"
26
27 set view ,,,1.0
28
29 set title "Parametric Torus"
30 set urange [0:2*pi]
31 set vrange [0:2*pi]
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)"
35
36
37 set title "Parametric Hexagon"
38 set urange [-1.3:1.3]
39 set vrange [0:2*pi]
40 set autoscale z
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
43 set ztics autofreq
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)"
46
47 set view ,,1.,1.
48
49 set title "Parametric Helix"
50 set isosamples 100,20
51 set urange [0:10*pi]
52 set vrange [0:2*pi]
53 set autoscale z
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)"
56
57
58 set title "Parametric Shell (clipped to limited z range)"
59 set isosamples 40,20
60 set view 50,30,1.0
61 set urange [0:2*pi]
62 set vrange [0:2*pi]
63 set zrange [-3:1.5]
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)"
66
67 set autoscale z
68 set title "Parametric Shell (automatic z range)"
69 replot
70 pause -1 "Hit return to continue (8)"
71
72 set title "Interlocking Tori"
73
74 set urange [-pi:pi]
75 set vrange [-pi:pi]
76 set isosamples 50,20
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)"
80 reset