-
Notifications
You must be signed in to change notification settings - Fork 0
/
cylinder.gnu~
120 lines (92 loc) · 2.43 KB
/
cylinder.gnu~
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
reset
#set term pngcairo size 1000,1000
set term wxt
#set terminal postscript eps enhanced solid "Helvetica" 14
#set term svg size 600,400 dynamic enhanced fname 'arial' fsize 11 butt solid
unset key; unset border
unset colorbox
unset xtics; unset xlabel
unset ytics; unset ylabel
unset ztics
set lmargin 0.1
set rmargin 0.1
set tmargin 0.1
set bmargin 0.1
set size square
set parametric
r = 4
h = 20.0
cx = 32.0
cy = 32.0
cz = 32.0
top = cy + h / 2.0
bottom = cy - h / 2.0
set urange [0:2*pi]
set vrange [0:r]
set isosamples 29
set style line 1 lc rgb '#666666' lt 1 lw 1 pt 7 ps 1.5
set style line 2 lc rgb '#444444' lt 1 lw 1 pt 7 ps 1.5
set style line 4 lc rgb '#771122' lt 2 lw 1
# Parametric functions for the cylinder
# Axis of cylindrical symmetry parallel to y axis
fx(u,v) = v*sin(u) + cx
fz(u,v) = v*cos(u) + cz
gx(u) = r*sin(u) + cy
gy(v) = v * (top - bottom) / r + bottom
gz(u) = r*cos(u) + cy
set xrange[0:63]
set yrange[0:63]
set zrange[0:63]
set hidden3d nooffset
i=16
infile = 'final185'
do for[i=30:30] {
# set multiplot layout 1,3
# filename = sprintf("side2.5.eps");
# set out filename
#
# set view 0,0
#
# splot \
# infile using (strcol(2) == i ? $6 : 1/0):7:8:9:10:11 w vec nohead ls 4, \
# gx(u),gy(v),gz(u) ls 1, \
# fx(u,v),bottom,fz(u,v) ls 1, \
# gx(u),bottom,gz(u) ls 2, \
# fx(u,v),top,fz(u,v) ls 1, \
# gx(u),top,gz(u) ls 2
# filename = sprintf("top2.5.eps");
# set out filename
set view 90,180
splot \
infile using (strcol(2) == i ? $6 : 1/0):7:8:9:10:11 w vec nohead ls 4, \
fx(u,v),bottom,fz(u,v) ls 1, \
gx(u),bottom,gz(u) ls 2, \
gx(u),gy(v),gz(u) ls 1, \
fx(u,v),top,fz(u,v) ls 1, \
gx(u),top,gz(u) ls 2
filename = sprintf("tilted2.5.eps");
set out filename
# set view 320,180
#
# splot \
# infile using (strcol(2) == i ? $6 : 1/0):7:8:9:10:11 w vec nohead ls 4, \
# fx(u,v),bottom,fz(u,v) ls 1, \
# gx(u),bottom,gz(u) ls 2, \
# gx(u),gy(v),gz(u) ls 1, \
# fx(u,v),top,fz(u,v) ls 1, \
# gx(u),top,gz(u) ls 2
# splot \
# 'final163' using (strcol(2) == i ? $6 : 1/0):7:8:9:10:11 w vec nohead ls 4, \
# fx(u,v),bottom,fz(u,v), \
# gx(u),bottom,gz(u), \
# gx(u),gy(v),gz(u), \
# fx(u,v),top,fz(u,v), \
# gx(u),top,gz(u)
#
# unset multiplot
}
# Axis of cylindrical symmetry parallel to z axis
#fx(u) = r*cos(u) + 16
#fy(u) = r*sin(u) + 16
#fz(v) = v
#splot 'gridpt4_30' using 6:7:8:9:10:11 w vec nohead, fx(u),fy(u),fz(v),r,0,6.0 w pm3d