f2c04ccdad 2021-03-03 1: ###################################
f2c04ccdad 2021-03-03 2: # GNUPLOT PLOTTING
f2c04ccdad 2021-03-03 3: ###################################
f2c04ccdad 2021-03-03 4:
f2c04ccdad 2021-03-03 5: # IMPORTANT: This file is for use in Plot
f2c04ccdad 2021-03-03 6: # mode.
f2c04ccdad 2021-03-03 7:
f2c04ccdad 2021-03-03 8: reset
f2c04ccdad 2021-03-03 9: unset title
f2c04ccdad 2021-03-03 10: set label 1 "Kuen's Surface" at screen 0.6, 0.9
f2c04ccdad 2021-03-03 11: set output "Kuen's Surface"
f2c04ccdad 2021-03-03 12: set label 1 font "frscript,25"
f2c04ccdad 2021-03-03 13: set style line 3 linetype -1 linewidth 0.5
f2c04ccdad 2021-03-03 14: set pm3d depthorder hidden3d 3
f2c04ccdad 2021-03-03 15: set style fill transparent solid 0.65 border
f2c04ccdad 2021-03-03 16: set palette
f2c04ccdad 2021-03-03 17: set hidden3d
f2c04ccdad 2021-03-03 18: set ticslevel 0
f2c04ccdad 2021-03-03 19: unset xtics
f2c04ccdad 2021-03-03 20: unset ytics
f2c04ccdad 2021-03-03 21: unset ztics
f2c04ccdad 2021-03-03 22: unset border
f2c04ccdad 2021-03-03 23: unset colorbox
f2c04ccdad 2021-03-03 24: unset key
f2c04ccdad 2021-03-03 25: set lmargin at screen 0.1
f2c04ccdad 2021-03-03 26: set bmargin at screen 0.1
f2c04ccdad 2021-03-03 27: set rmargin at screen 0.9
f2c04ccdad 2021-03-03 28: set tmargin at screen 0.9
f2c04ccdad 2021-03-03 29: set parametric
f2c04ccdad 2021-03-03 30: set dummy u,v
f2c04ccdad 2021-03-03 31: set urange [-4.5:4.5]
f2c04ccdad 2021-03-03 32: set vrange [0.05:pi-0.05]
f2c04ccdad 2021-03-03 33: set isosamples 51,51
f2c04ccdad 2021-03-03 34: set view 122, 357, 1.35, 1.08
f2c04ccdad 2021-03-03 35: a = 1.0
f2c04ccdad 2021-03-03 36: x(u,v) = 2.*a*(cos(u)+u*sin(u))*sin(v) / (1+u**2.*(sin(v))**2)
f2c04ccdad 2021-03-03 37: y(u,v) = 2.*a*(sin(u)-u*cos(u))*sin(v) / (1+u**2.*(sin(v))**2)
f2c04ccdad 2021-03-03 38: z(u,v) = a*log(tan(v/2.))+2.*cos(v)/(1+u**2.*(sin(v))**2)
f2c04ccdad 2021-03-03 39: splot x(u,v), y(u,v), z(u,v) with pm3d
f2c04ccdad 2021-03-03 40:
f2c04ccdad 2021-03-03 41:
f2c04ccdad 2021-03-03 42: reset
f2c04ccdad 2021-03-03 43: unset surface
f2c04ccdad 2021-03-03 44: set output "3D Log"
f2c04ccdad 2021-03-03 45: set title "3D Log"
f2c04ccdad 2021-03-03 46: set samples 30; set isosamples 30
f2c04ccdad 2021-03-03 47: set pm3d
f2c04ccdad 2021-03-03 48: set style line 100 lt 5 lw 0.5
f2c04ccdad 2021-03-03 49: set pm3d hidden3d 100
f2c04ccdad 2021-03-03 50: set view 50,220
f2c04ccdad 2021-03-03 51: set xrange [-2:2]
f2c04ccdad 2021-03-03 52: set yrange [-2:2]
f2c04ccdad 2021-03-03 53: splot log(x*x*y*y)
f2c04ccdad 2021-03-03 54:
f2c04ccdad 2021-03-03 55:
f2c04ccdad 2021-03-03 56: reset
f2c04ccdad 2021-03-03 57: set title "Interlocking Torus"
f2c04ccdad 2021-03-03 58: set output "3D Torus"
f2c04ccdad 2021-03-03 59: set parametric
f2c04ccdad 2021-03-03 60: set urange [-pi:pi]
f2c04ccdad 2021-03-03 61: set vrange [-pi:pi]
f2c04ccdad 2021-03-03 62: set isosamples 50,20
f2c04ccdad 2021-03-03 63: unset key
f2c04ccdad 2021-03-03 64: unset xtics
f2c04ccdad 2021-03-03 65: unset ytics
f2c04ccdad 2021-03-03 66: unset ztics
f2c04ccdad 2021-03-03 67: set border 0
f2c04ccdad 2021-03-03 68: set view 60, 30, 1.5, 0.9
f2c04ccdad 2021-03-03 69: set origin 0.0,-0.1
f2c04ccdad 2021-03-03 70: set size 0.9, 1.1
f2c04ccdad 2021-03-03 71: set colorbox vertical user origin 0.9, 0.15 size 0.02, 0.50
f2c04ccdad 2021-03-03 72: set format cb "%.1f"
f2c04ccdad 2021-03-03 73: set pm3d depthorder
f2c04ccdad 2021-03-03 74: splot cos(u)+.5*cos(u)*cos(v),sin(u)+.5*sin(u)*cos(v),.5*sin(v) with pm3d, 1+cos(u)+.5*cos(u)*cos(v),.5*sin(v),sin(u)+.5*sin(u)*cos(v) with pm3d
f2c04ccdad 2021-03-03 75:
f2c04ccdad 2021-03-03 76:
f2c04ccdad 2021-03-03 77: reset
f2c04ccdad 2021-03-03 78: unset surface
f2c04ccdad 2021-03-03 79: set output "3D Cosh"
f2c04ccdad 2021-03-03 80: set title "3D Cosh"
f2c04ccdad 2021-03-03 81: set samples 30
f2c04ccdad 2021-03-03 82: set isosamples 30
f2c04ccdad 2021-03-03 83: set pm3d
f2c04ccdad 2021-03-03 84: set style line 100 lt 5 lw 0.5
f2c04ccdad 2021-03-03 85: set pm3d hidden3d 100
f2c04ccdad 2021-03-03 86: set view 50,220
f2c04ccdad 2021-03-03 87: set xrange [-2:2]
f2c04ccdad 2021-03-03 88: set yrange [-2:2]
f2c04ccdad 2021-03-03 89: splot cosh(x)+cosh(y)
f2c04ccdad 2021-03-03 90:
f2c04ccdad 2021-03-03 91:
f2c04ccdad 2021-03-03 92: reset
f2c04ccdad 2021-03-03 93: unset surface
f2c04ccdad 2021-03-03 94: set output "3D Exp"
f2c04ccdad 2021-03-03 95: set title "3D Exp"
f2c04ccdad 2021-03-03 96: set samples 30; set isosamples 30
f2c04ccdad 2021-03-03 97: set xrange [-2:2]
f2c04ccdad 2021-03-03 98: set yrange [-2:2]
f2c04ccdad 2021-03-03 99: set pm3d
f2c04ccdad 2021-03-03 100: splot exp(-x*x)*exp(-y*y)
f2c04ccdad 2021-03-03 101:
f2c04ccdad 2021-03-03 102:
f2c04ccdad 2021-03-03 103: reset
f2c04ccdad 2021-03-03 104: unset surface
f2c04ccdad 2021-03-03 105: set output "3D Sin"
f2c04ccdad 2021-03-03 106: set title "3D Sin"
f2c04ccdad 2021-03-03 107: set samples 30
f2c04ccdad 2021-03-03 108: set isosamples 30
f2c04ccdad 2021-03-03 109: set pm3d
f2c04ccdad 2021-03-03 110: set style line 100 lt 5 lw 0.5
f2c04ccdad 2021-03-03 111: set pm3d hidden3d 100
f2c04ccdad 2021-03-03 112: set view 50,220
f2c04ccdad 2021-03-03 113: set xrange [-3:3]
f2c04ccdad 2021-03-03 114: set yrange [-3:3]
f2c04ccdad 2021-03-03 115: splot sin(x*x+y*y)
f2c04ccdad 2021-03-03 116:
f2c04ccdad 2021-03-03 117:
f2c04ccdad 2021-03-03 118: # PM3D surfaces are not included in the calculation of hidden line removal.
f2c04ccdad 2021-03-03 119: # However, you can approximate this by drawing the surface twice,
f2c04ccdad 2021-03-03 120: # once "with pm3d" to produce the surface you want to show, and once
f2c04ccdad 2021-03-03 121: # "with lines lt -2" to include the same surface in hidden3d calculations.
f2c04ccdad 2021-03-03 122: # The "lt -2" makes the hidden3d copy of the surface invisible.
f2c04ccdad 2021-03-03 123: #
f2c04ccdad 2021-03-03 124: reset
f2c04ccdad 2021-03-03 125: set hidden3d front
f2c04ccdad 2021-03-03 126: set isosamples 25,25
f2c04ccdad 2021-03-03 127: set xyplane at 0
f2c04ccdad 2021-03-03 128: unset key
f2c04ccdad 2021-03-03 129: set palette rgbformulae 31,-11,32
f2c04ccdad 2021-03-03 130: set style fill solid 0.5
f2c04ccdad 2021-03-03 131: set cbrange [-1:1]
f2c04ccdad 2021-03-03 132: set title "Mixing pm3d surfaces with hidden-line plots"
f2c04ccdad 2021-03-03 133: set output "Mixing pm3d surfaces with hidden-line plots"
f2c04ccdad 2021-03-03 134: f(x,y) = sin(-sqrt((x+5)**2+(y-7)**2)*0.5)
f2c04ccdad 2021-03-03 135: splot f(x,y) with pm3d, x*x-y*y with lines lt 1 lc rgb "#000000", f(x,y) with lines lt -2 notitle;