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

SCM Repository

[diderot] Annotation of /branches/vis15/src/tests/rtest/tests/curl2d/curl2d.diderot
ViewVC logotype

Annotation of /branches/vis15/src/tests/rtest/tests/curl2d/curl2d.diderot

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4102 - (view) (download)

1 : jhr 4102 // process output with:
2 :     // unu quantize -i out.nrrd -b 8 -o curl-turb2d.png
3 :    
4 :    
5 :     int imgSizeX = 16;
6 :     int imgSizeY = 16;
7 :    
8 :     field#1(2)[2] V = image("../../data/const-curl2d.nrrd") ⊛ bspln3;
9 :    
10 :     strand CURL (int xi, int yi) {
11 :     real xx = lerp(2.00, 17.0, 0.0, real(xi), real(imgSizeX)-1.0);
12 :     real yy = lerp(2.00, 17.0, 0.0, real(yi), real(imgSizeY)-1.0);
13 :     vec2 pos = [xx,yy];
14 :    
15 :     output real out = 0.0;
16 :    
17 :     update {
18 :     out = ∇×V(pos);
19 :    
20 :     stabilize;
21 :     }
22 :     }
23 :    
24 :     grid(2) { 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