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

SCM Repository

[diderot] Annotation of /branches/pure-cfg/test/zslice-hess.diderot
ViewVC logotype

Annotation of /branches/pure-cfg/test/zslice-hess.diderot

Parent Directory Parent Directory | Revision Log Revision Log


Revision 804 - (view) (download)

1 : glk 734
2 :     int dataSize = 11;
3 :     int imgSize = 200;
4 :     vec3 orig = [0.0, 0.0, 5.0];
5 :     vec3 cVec = [0.0, 1.0, 0.0];
6 :     vec3 rVec = [1.0, 0.0, 0.0];
7 : glk 770 image(3)[] img = load("../data/zimg11.nrrd");
8 : glk 734 field#2(3)[] F = img ⊛ bspln3;
9 :    
10 :     strand RayCast (int row, int col)
11 :     {
12 : glk 770 real rr = lerp(-0.5, real(dataSize)-0.5, -0.5, real(row), real(imgSize)-0.5);
13 :     real cc = lerp(-0.5, real(dataSize)-0.5, -0.5, real(col), real(imgSize)-0.5);
14 : glk 734 vec3 pos = orig + rr*rVec + cc*cVec;
15 :     output real val = 0.0;
16 :    
17 :     update
18 :     {
19 :     if (inside (pos,F)) {
20 : jhr 800 val = trace(∇(∇F)@pos);
21 : glk 734 }
22 :     stabilize;
23 :     }
24 :     }
25 :    
26 :     initially [ RayCast(r, c) | r in 0..(imgSize-1), c in 0..(imgSize-1) ];

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