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 4497 - (view) (download)

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