File: surface2.dem

package info (click to toggle)
gnuplot 3.5beta6.347-3
  • links: PTS
  • area: main
  • in suites: slink
  • size: 5,032 kB
  • ctags: 4,235
  • sloc: ansic: 42,086; makefile: 561; asm: 539; sh: 386; objc: 379; csh: 297; pascal: 194; perl: 138; lisp: 88
file content (91 lines) | stat: -rw-r--r-- 1,930 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#
# $Id: surface2.dem,v 1.4 1997/04/05 19:44:49 drd Exp $
#
set parametric
set isosamples 50,10
set hidden

set title "Parametric Sphere"
set urange [-pi/2:pi/2]
set vrange [0:2*pi]
set zrange [-1:1]
set ztics nomirror -1.0,0.25,1.0
set view 45,50,,2.5
splot cos(u)*cos(v),cos(u)*sin(v),sin(u)
pause -1 "Hit return to continue (1)"

set view ,,,0.8
replot
pause -1 "Hit return to continue (2)"

set view ,,,1.6
replot
pause -1 "Hit return to continue (3)"

set view ,,,1.0

set title "Parametric Torus"
set urange [0:2*pi]
set vrange [0:2*pi]
splot (1-0.2*cos(v))*cos(u),(1-0.2*cos(v))*sin(u),0.2*sin(v)
pause -1 "Hit return to continue (4)"


set view ,,,2.0

set title "Parametric Hexagon"
set urange [-1.3:1.3]
set vrange [0:2*pi]
set zrange [-0.6:0.6]
set zrange [-1:1]
set ztics
splot cos(v)**3*cos(u)**3,sin(v)**3*cos(u)**3,sin(u)**3
pause -1 "Hit return to continue (5)"

set view ,,,1.5

set title "Parametric Helix"
set isosamples 100,20
set urange [0:10*pi]
set vrange [0:2*pi]
set autoscale z
splot (1-0.1*cos(v))*cos(u),(1-0.1*cos(v))*sin(u),0.1*(sin(v)+u/1.7-10)
pause -1 "Hit return to continue (6)"

set view ,,,1.0

set title "Parametric Shell (cut by hidden3d)"
set isosamples 40,20
set view 50,30,1.0
set urange [0:2*pi]
set vrange [0:2*pi]
set zrange [-3:1.5]
splot cos(u)*u*(1+cos(v)/2),sin(v)*u/2,sin(u)*u*(1+cos(v)/2)
pause -1 "Hit return to continue (7)"

set autoscale z
set title "Parametric Shell"
replot
pause -1 "Hit return to continue (8)"

set title "Interlocking Tori"

set urange [-pi:pi]
set vrange [-pi:pi]
set isosamples 50,20
splot cos(u)+.5*cos(u)*cos(v),sin(u)+.5*sin(u)*cos(v),.5*sin(v) with lines, 1+cos(u)+.5*cos(u)*cos(v),.5*sin(v),sin(u)+.5*sin(u)*cos(v) with lines
pause -1 "Hit return to continue (9)"

#
# Clean up:
#
set noparametric
set dummy x,y
set isosamples 10,10
set view 60,30,1,1
set urange [-5:5]
set vrange [-5:5]
set zrange [-10:10]
set auto
set title "" 0,0
set nohidden