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

SCM Repository

[diderot] Diff of /branches/vis12/test/vr.diderot
ViewVC logotype

Diff of /branches/vis12/test/vr.diderot

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

revision 38, Thu Feb 11 03:51:54 2010 UTC revision 39, Thu Feb 11 16:58:32 2010 UTC
# Line 5  Line 5 
5    
6  input string dataFile;          // name of dataset  input string dataFile;          // name of dataset
7  input real stepSz;              // size of steps  input real stepSz;              // size of steps
8    input vec<3> light;
9    input int wid = 640;
10    input int ht = 480;
11    
12  image<3> img = load (dataFile);  image[3] img = load (dataFile);
13    
14    field#1[3] F = convolve (bspln3, img);
15    
16  actor RayCast (int row, int col)  actor RayCast (int row, int col)
17  {  {
18      vec<3>      dir = (real(row), real(col));      vec<3>      dir = (real(row), real(col), 0.0);
19      vec<3>      pos = (0.0, 0.0);      vec<3>      pos = (0.0, 0.0, 0.0);
20      vec<3>      t = 0.0;      real        t = 0.0;
21        real[4]     color = (0.0, 0.0, 0.0, 0.0);
22    
23      update      update
24      {      {
25          pos = pos + t*dir;          vec<3> pt = pos + t*dir;
26            t = t + stepSz;
27            vec<3> g = (D F)@pt;
28            color = over(color, phong(light, g, txf(F@pt)));
29            if (color[3] >= 0.999)
30                stabilize;
31      }      }
32    
33  }  }

Legend:
Removed from v.38  
changed lines
  Added in v.39

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