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

SCM Repository

[diderot] Diff of /branches/lamont/test/zslice-hess.diderot
ViewVC logotype

Diff of /branches/lamont/test/zslice-hess.diderot

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1685, Sun Jan 22 15:23:36 2012 UTC revision 1958, Tue Jul 10 13:01:03 2012 UTC
# Line 4  Line 4 
4  vec3 orig = [0.0, 0.0, 5.0];  vec3 orig = [0.0, 0.0, 5.0];
5  vec3 cVec = [0.0, 1.0, 0.0];  vec3 cVec = [0.0, 1.0, 0.0];
6  vec3 rVec = [1.0, 0.0, 0.0];  vec3 rVec = [1.0, 0.0, 0.0];
7  image(3)[] img = load("../data/zimg11.nrrd");  image(3)[] img = image("../data/zimg11.nrrd");
8  field#2(3)[] F = img ⊛ bspln3;  field#2(3)[] F = img ⊛ bspln3;
9    
10  strand RayCast (int row, int col)  strand RayCast (int row, int col)
# Line 12  Line 12 
12      real rr = lerp(-0.5, real(dataSize)-0.5, -0.5, real(row), real(imgSize)-0.5);      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);      real cc = lerp(-0.5, real(dataSize)-0.5, -0.5, real(col), real(imgSize)-0.5);
14      vec3 pos = orig + rr*rVec + cc*cVec;      vec3 pos = orig + rr*rVec + cc*cVec;
15      output real val = 0.0;      output tensor[3,3] H = zeros[3,3];
16        real x = 0.0;
17    
18      update      update
19      {      {
20          if (inside (pos,F)) {          if (inside (pos,F)) {
21              tensor[3,3] H = ∇⊗∇F(pos);              H = ∇⊗∇F(pos);
22              val = trace(∇⊗∇F(pos));              x = H[2,1];
23                // val = trace(∇⊗∇F(pos));
24              // can compare with following; tests subscripting              // can compare with following; tests subscripting
25              // val = H[0,0] + H[1,1] + H[2,2];              // val = H[0,0] + H[1,1] + H[2,2];
26          }          }

Legend:
Removed from v.1685  
changed lines
  Added in v.1958

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