getf("spin2d.sci");
//
// Processus d'election
// 
caprices = rand(40,40)<0.5;
taux_election = [[0:4];[4:-1:0]];
xset("window",0); xbasc();
opinions = spin2d(caprices,taux_election,100000);
//
// Processus de contact
//
cas = rand(100,100)<0.01;
taux_contact = [2*[0:4];ones(1,5)];
xset("window",1); xbasc();
epidemie = spin2d(cas,taux_contact,100000);
taux_contact = [0.2*[0:4];ones(1,5)];
xset("window",2); xbasc();
guerison = spin2d(epidemie,taux_contact,100000);
//
// Debruitage d'image
//
echiquier = ones(4,4).*.eye(2,2).*.ones(10,10) <0.5;
taux_bruit = ones(2,5);
xset("window",3); xbasc();
bruitee = spin2d(echiquier,taux_bruit,1000);
taux_savon = [0,0,0,1,1;1,1,0,0,0];
xset("window",4); xbasc();
propre = spin2d(bruitee,taux_savon,20000);




