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

SCM Repository

[diderot] Annotation of /branches/vis12/rtest/tests/curl3d/curl3d.diderot
ViewVC logotype

Annotation of /branches/vis12/rtest/tests/curl3d/curl3d.diderot

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2547 - (view) (download)

1 : nseltzer 2547
2 :    
3 :     int imgSizeX = 16;
4 :     int imgSizeY = 16;
5 :     int imgSizeZ = 16;
6 :    
7 :     field#1(3)[3] V = image("../../data/const-curl3d.nrrd") ⊛ bspln3;
8 :    
9 :     strand CURL (int xi, int yi, int zi) {
10 :     real xx = lerp(2.00, 17.0, 0.0, real(xi), real(imgSizeX)-1.0);
11 :     real yy = lerp(2.00, 17.0, 0.0, real(yi), real(imgSizeY)-1.0);
12 :     real zz = lerp(2.00, 17.0, 0.0, real(zi), real(imgSizeZ)-1.0);
13 :     vec3 pos = [xx,yy,zz];
14 :    
15 :     output vec3 out = [0.0,0.0,0.0];
16 :    
17 :     update {
18 :     out = ∇×V(pos);
19 :    
20 :     stabilize;
21 :     }
22 :     }
23 :    
24 :     initially [ CURL(xi, yi, zi) | zi in 0..(imgSizeZ-1), yi in 0..(imgSizeY-1), xi in 0..(imgSizeX-1) ];

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