# ¿Þ£± s0 ¶ÊÌÌ¤È c1 ¶ÊÀþ TMP1="tmp1\$\$" TMP2="tmp2\$\$" trap 'rm -f \$TMP1 \$TMP2; exit 0' 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 /usr/bin/awk ' BEGIN { PI = atan2(0, -1) PI2 = atan2(0, -1) * 2 a = 1 k1 = sqrt(2) zmin = 0 # zmax = zmin + 10 zmax = zmin + PI2 dz = (zmax - zmin) / 5 for (z = 0; z <= zmax; z += dz) { for (p = PI; p <= PI2; p += PI / 50) { x = a * cos(p) y = a * sin(p) print x, y, z >"'"\$TMP1"'" } print "\n" >"'"\$TMP1"'" } for (p = 0; p <= PI2; p += PI / 50) { x = a * cos(p) y = a * sin(p) print x, y, zmax >"'"\$TMP1"'" } print "\n" >"'"\$TMP1"'" d = (zmax - zmin) / 50 for (p = PI; p <= PI2; p += PI/ 10) { for (z = zmin; z <= zmax; z += d) { x = a * cos(p) y = a * sin(p) print x, y, z >"'"\$TMP1"'" } print "\n" >"'"\$TMP1"'" } for (z = zmin; z <= zmax; z += d) { p = sqrt(k1^2 - 1)*z/a if (k < 0) p = -1 x = a*cos(p) y = a*sin(p) print x, y, z >"'"\$TMP2"'" } exit 0 } END { print "set size square 0.5" print "set nokey" print "set zeroaxis" print "set noxtics" print "set noytics" print "set noztics" print "set noborder" print "set view 60,0,1" print "splot \"'"\$TMP1"'\" with lines lc \"red\", \"'"\$TMP2"'\" with lines lc \"black\"" print "" exit 0 } ' | gnuplot -persist