#!/usr/local/bin/gnuplot -persist # set terminal pngcairo transparent enhanced font "arial,10" fontscale 1.0 size 600, 400 # set output 'pm3d_lighting.1.png' unset border set style fill solid 1.00 noborder set format x "" set format y "" set format x2 "" set format y2 "" set format z "" set format cb "" set format r "" set grid nopolar set grid xtics nomxtics ytics nomytics noztics nomztics nortics nomrtics \ nox2tics nomx2tics noy2tics nomy2tics nocbtics nomcbtics set grid layerdefault lt black linewidth 1.000 dashtype solid, lt black linewidth 1.000 dashtype solid unset key unset parametric set view 33, 291, 1.2, 1.3 set samples 200, 200 set isosamples 200, 200 set style data lines set xyplane relative -0.05 unset ztics set title "pm3d lighting model with specular highlighting" set urange [ -20.0000 : 20.0000 ] noreverse nowriteback set vrange [ -20.0000 : 20.0000 ] noreverse nowriteback set xrange [ * : * ] noreverse writeback set x2range [ * : * ] noreverse writeback set yrange [ * : * ] noreverse writeback set y2range [ * : * ] noreverse writeback set zrange [ -0.250000 : 0.500000 ] noreverse nowriteback set cbrange [ * : * ] noreverse writeback set rrange [ * : * ] noreverse writeback set bmargin 0 set tmargin 0 set pm3d implicit at s set pm3d depthorder set pm3d lighting primary 0.5 specular 0.2 spec2 0 set colorbox vertical origin screen 0.9, 0.2 size screen 0.05, 0.6 front noinvert bdefault unset colorbox slice(x,y) = (x**2+y**2 < 10.0) ? 1.0 : (x**2+y**2 > 300.0) ? NaN : sin(abs(atan2(x,y))) sinc2(x,y) = sin(sqrt(x**2+y**2))/sqrt(x**2+y**2) flatten(x,y) = sqrt(x**2+y**2)/5. F(x,y) = sinc2(x,y) * slice(x,y) * flatten(x,y) NO_ANIMATION = 1 ## Last datafile plotted: "++" splot '++' using 1:2:(F($1,$2)):(0xAAEEEE) nosurface lc rgb variable