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

SCM Repository

[diderot] View of /branches/vis12/rtest2/tests/tracefield2-x1b/tracefield2-x1b.diderot
ViewVC logotype

View of /branches/vis12/rtest2/tests/tracefield2-x1b/tracefield2-x1b.diderot

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3198 - (download) (annotate)
Thu Jun 25 11:14:38 2015 UTC (4 years ago) by jhr
File size: 653 byte(s)
create a local copy of data sources for rtest2
int imgSizeX = 16;
int imgSizeY = 16;

field#1(2)[2] V = image("../../data/const-curl2d.nrrd") ⊛ bspln3;

strand CURL (int xi, int yi) {
       real xx = lerp(2.00, 17.0, 0.0, real(xi), real(imgSizeX)-1.0);
       real yy = lerp(2.00, 17.0, 0.0, real(yi), real(imgSizeY)-1.0);
       vec2 pos = [xx,yy];
         output real out = 99;


       update {
                if(inside(pos,V)){
                 //tensor[2,2] m=(V⊗V)(pos);
                 tensor[2,2] m=V(pos)⊗V(pos);
                 out=trace(m);           

}
    else{out=99;}
	      	  stabilize;
		  }
}

initially [ CURL(xi, yi) | yi in 0..(imgSizeY-1), xi in 0..(imgSizeX-1) ];

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