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

SCM Repository

[diderot] Annotation of /branches/vis15/src/tests/ertest/test1/outerField2/outerField2.diderot
ViewVC logotype

Annotation of /branches/vis15/src/tests/ertest/test1/outerField2/outerField2.diderot

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4134 - (view) (download)

1 : jhr 3588
2 :     image(2)[2] Fimg= image("../../data/turb2d.nrrd");
3 :     field#1(2)[2] F= Fimg ⊛ ctmr; //support 2
4 :     field#1(2)[2] V = image("../../data/const-curl2d.nrrd") ⊛ bspln3;
5 :     int imgSizeX = 1020;
6 :     int imgSizeY = 561;
7 :     strand fieldTest (int xi, int yi) {
8 : jhr 4134 real xx = lerp(0.3, 6.75, 0.0, real(xi), real(imgSizeX)-1.0);
9 :     real yy = lerp(0.6, 3.69, 0.0, real(yi), real(imgSizeY)-1.0);
10 :     vec2 pos = [xx,yy];
11 :     vec2 mm=pos+pos;
12 : jhr 3588
13 : jhr 4134 output tensor[2,2] out = [[99,99],[99,99]];
14 :     // output tensor[2,2] r=F(pos)⊗V(pos);//outer product
15 :     update
16 : jhr 3588 {
17 : jhr 4134 if (inside(pos, V)) {
18 :     out = (F⊗V)(pos);//outer product
19 : jhr 3588 }
20 : jhr 4134 else {
21 :     out = [[99,99],[99,99]];
22 :     }
23 :     stabilize;
24 : jhr 3588 }
25 :     }
26 :    
27 :     initially [ fieldTest(xi, yi) | yi in 0..(imgSizeY-1), xi in 0..(imgSizeX-1)];
28 :    

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