Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] View of /tests/DATm-sample/g_11/observ.diderot
ViewVC logotype

View of /tests/DATm-sample/g_11/observ.diderot

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5136 - (download) (annotate)
Thu Jul 20 16:17:24 2017 UTC (2 years, 2 months ago) by cchiw
File size: 841 byte(s)
datm sample of programs
field#4(2)[2, 2]F0 = c4hexic⊛  image("rst/data/inputfile0.nrrd");
tensor [2, 2]F1 = [[1, -1], [-2, -3]];
tensor []F2 = 2;
input real scale = 1;
field#4(2)[2, 2]G = ((normalize(F0))-(F1))*(F2);
int length =7;
strand f(int i) {

	output tensor [2, 2] out =  [ [0.0,0.0], [0.0,0.0]];
	    update {

		tensor [2] pos=[0,0];
		if(i==0){
			pos = ([0.24, 0.3]);
		}
		else if(i==1){
			pos = ([0.24, 0.3]);
		}
		else if(i==2){
			pos = ([-0.38, 0.04]);
		}
		else if(i==3){
			pos = ([-0.39, 0.08]);
		}
		else if(i==4){
			pos = ([0.1, 0.15]);
		}
		else if(i==5){
			pos = ([0.35, -0.18]);
		}
		else if(i==6){
			pos = ([0.0, 0.2]);
		}
		else if(i==7){
			pos = ([0.39, -0.28]);
		}

	if((inside(pos,F0)) && true){
			out = (G)(pos);
	}
	 else{out =  [ [7.2,7.2], [7.2,7.2]];}
        stabilize;
    }
}
initially [ f(i) | i in 0..length];

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0