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

SCM Repository

[diderot] Annotation of /branches/tash/test/zslice-bspln5.diderot
ViewVC logotype

Annotation of /branches/tash/test/zslice-bspln5.diderot

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3210 - (view) (download)
Original Path: branches/fem/test/zslice-bspln5.diderot

1 : glk 1873 // 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 : glk 1873 field#4(3)[] F = img ⊛ bspln5;
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 : glk 1959 output vec3 val = [0.0,0.0,0.0];
20 : glk 1873
21 :     update
22 :     {
23 :     if (inside (pos,F)) {
24 :     tensor[3,3] H = ∇⊗∇F(pos);
25 :     real{3} ev = evals(H);
26 : glk 1959 // all three should be the same value
27 :     val = [ev{0} + ev{1} + ev{2},
28 :     H[0,0] + H[1,1] + H[2,2],
29 :     identity[3]:H];
30 : glk 1873 }
31 :     stabilize;
32 :     }
33 :     }
34 :    
35 :     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