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

SCM Repository

[diderot] Annotation of /branches/charisee/ertest/tests/dotField2/dotField2.diderot
ViewVC logotype

Annotation of /branches/charisee/ertest/tests/dotField2/dotField2.diderot

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3066 - (view) (download)

1 : cchiw 2860
2 : cchiw 3066 image(2)[2] Fimg= image("../../../data/turb2d.nrrd");
3 : cchiw 2860 field#1(2)[2] F= Fimg ⊛ ctmr; //support 2
4 : cchiw 3066 field#1(2)[2] V = image("../../../data/const-curl2d.nrrd") ⊛ bspln3;
5 : cchiw 2860 int imgSizeX = 1020;
6 :     int imgSizeY = 561;
7 :     strand fieldTest (int xi, int yi) {
8 :     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 :    
12 :     output tensor[] out=0;
13 :    
14 :     update
15 :     {
16 :    
17 :     if(inside(pos,F)){
18 :     if(inside(pos,V)){
19 :     out=(F•V)(pos);//inner product
20 :    
21 :     }
22 :     }
23 :     stabilize;
24 :    
25 :     }
26 :     }
27 :    
28 :     initially [ fieldTest(xi, yi) | yi in 0..(imgSizeY-1), xi in 0..(imgSizeX-1)];
29 :    

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