Annotation of OpenXM_contrib/gnuplot/demo/surface2.dem, Revision 1.1.1.3
1.1 maekawa 1: #
1.1.1.3 ! ohara 2: # $Id: surface2.dem,v 1.2.2.3 2001/12/04 14:12:53 lhecking Exp $
1.1 maekawa 3: #
4: set parametric
5: set isosamples 50,10
6: set hidden
1.1.1.2 maekawa 7: set key below
1.1 maekawa 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
1.1.1.2 maekawa 13: set view 45,50
1.1 maekawa 14: splot cos(u)*cos(v),cos(u)*sin(v),sin(u)
15: pause -1 "Hit return to continue (1)"
16:
1.1.1.2 maekawa 17: set view ,,,0.7
18: set title "Parametric Sphere, crunched z axis"
1.1 maekawa 19: replot
20: pause -1 "Hit return to continue (2)"
21:
1.1.1.2 maekawa 22: set view ,,,1.4
23: set title "Parametric Sphere, enlarged z axis"
1.1 maekawa 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]
1.1.1.2 maekawa 32: set zrange [-1:1] # imitate old 'set view' hack
1.1 maekawa 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]
1.1.1.2 maekawa 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
1.1 maekawa 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:
1.1.1.2 maekawa 47: set view ,,1.,1.
1.1 maekawa 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:
1.1.1.2 maekawa 58: set title "Parametric Shell (clipped to limited z range)"
1.1 maekawa 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
1.1.1.2 maekawa 68: set title "Parametric Shell (automatic z range)"
1.1 maekawa 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
1.1.1.2 maekawa 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
1.1 maekawa 79: pause -1 "Hit return to continue (9)"
1.1.1.2 maekawa 80: reset
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>