Keywords: Shepard interpolation.png en Shepard's interpolation method for different values of the power parameter p own Hankwang n set pm3d set pm3d map unset colorbox unset grid unset surf unset grid unset xtics unset ytics unset border set size square set xra 0 1 set yra 0 1 x0 0 05 y0 0 dx 0 2 /mkscatter pl > scatter dat set term png size 640 160 giant set outp 'shepard_interpolation png' n 0 set bmargin at screen 0 05 set tmargin at screen 1 05 set multiplot set lmargin at screen x0+n dx; set rmargin at screen x0+ n+1 dx set dgrid3d 100 100 1 set label 1 'p 1' at screen x0+ n+ 5 dx 0 08 center splot 'scatter dat' n n+1 set lmargin at screen x0+n dx; set rmargin at screen x0+ n+1 dx set dgrid3d 100 100 2 set label 1 'p 2' at screen x0+ n+ 5 dx 0 08 center splot 'scatter dat' n n+1 set lmargin at screen x0+n dx; set rmargin at screen x0+ n+1 dx set dgrid3d 100 100 4 set label 1 'p 4' at screen x0+ n+ 5 dx 0 08 center splot 'scatter dat' n n+1 set lmargin at screen x0+n dx; set rmargin at screen x0+ n+1 dx set dgrid3d 100 100 16 set colorbox set label 1 'p 16' at screen x0+ n+ 5 dx 0 08 center splot 'scatter dat' unset multiplot set output ;Data generation perl <pre> /usr/bin/perl -w n 40; p 0 1; srand 6 ; for i 0; i < n; ++ i x rand 1 ; y rand 1 ; v rand 1 < p 1 0; print x y v\n ; </pre> Interpolation Images with Perl source code |