
function []=velpic_build_and_load() 
// since this demo can be run by someone 
// who has no write access in this directory 
// we use TMPDIR 
  if ~c_link('testpt') then
    curdir = getcwd(); 
    chdir(TMPDIR); 
    unix_s('cp '+SCI+'/demos/velpic/*.f .'); 
    files = ['id_rgn.o','testpt.o' ];
    ilib_for_link(['testpt';'idrgn'],files,[],"f");
    exec loader.sce 
    chdir(curdir) 
  end
endfunction 
velpic_build_and_load() 

// Copyright INRIA

getf('SCI/demos/velpic/velpic.sci')

xselect()
x=velpic(20,20);
grayplot(1:20,1:20,x(:,20:-1:1));
