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

SCM Repository

[diderot] Annotation of /branches/fem/test/zslice-eig.diderot
ViewVC logotype

Annotation of /branches/fem/test/zslice-eig.diderot

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1927 - (view) (download)
Original Path: branches/vis12/test/zslice-eig.diderot

1 : jhr 1671 // zslice-eig
2 :     //
3 :     // testing eigenvalue support (and sequences)
4 :     //
5 :    
6 :     int dataSize = 11;
7 :     int imgSize = 200;
8 :     vec3 orig = [0.0, 0.0, 5.0];
9 :     vec3 cVec = [0.0, 1.0, 0.0];
10 :     vec3 rVec = [1.0, 0.0, 0.0];
11 : jhr 1927 image(3)[] img = image("../data/zimg11.nrrd");
12 : jhr 1671 field#2(3)[] F = img ⊛ bspln3;
13 :    
14 :     strand RayCast (int row, int col)
15 :     {
16 :     real rr = lerp(-0.5, real(dataSize)-0.5, -0.5, real(row), real(imgSize)-0.5);
17 :     real cc = lerp(-0.5, real(dataSize)-0.5, -0.5, real(col), real(imgSize)-0.5);
18 :     vec3 pos = orig + rr*rVec + cc*cVec;
19 :     output real val = 0.0;
20 :    
21 :     update
22 :     {
23 :     if (inside (pos,F)) {
24 :     tensor[3,3] H = ∇⊗∇F(pos);
25 :     real{3} ev = evals(H);
26 :     val = ev{0} + ev{1} + ev{2};
27 :     }
28 :     stabilize;
29 :     }
30 :     }
31 :    
32 :     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