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

SCM Repository

[diderot] Diff of /trunk/test/vr-MIP.diderot
ViewVC logotype

Diff of /trunk/test/vr-MIP.diderot

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

revision 144, Fri Jul 9 08:11:03 2010 UTC revision 145, Fri Jul 9 08:14:51 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                                // e.g. 0.5
9  input vec3 eye;                 // location of eye point  input vec3 eye;                 // location of eye point
10                                // e.g. (50,30,20)
11  input vec3 orig;                // location of pixel (0,0)  input vec3 orig;                // location of pixel (0,0)
12                                // e.g. (16.7502,3.81144,16.1159)
13  input vec3 cVec;                // vector between pixels horizontally  input vec3 cVec;                // vector between pixels horizontally
14                                // e.g. (-0.0345728,0.0639965,0)
15  input vec3 rVec;                // vector between pixels vertically  input vec3 rVec;                // vector between pixels vertically
16                                // e.g. (0.016857,0.00910666,-0.0701694)
17    
18  image(3)[] img = load (dataFile);  image(3)[] img = load (dataFile);
19    
# Line 21  Line 26 
26      vec3        dir = (pos - eye)/|pos - eye|;      vec3        dir = (pos - eye)/|pos - eye|;
27      real        t = 0.0;      real        t = 0.0;
28      real        maxval = -inf;      real        maxval = -inf;
     int         num = 0;  
29    
30      update      update
31      {      {
32          vec3 pt = pos + t*dir;          vec3 pt = pos + t*dir;
33          real val = F@pt;          real val = F@pt;
34          maxval = max(val, maxval);          maxval = max(val, maxval);
35          if (t > 1.0)          if (t > 20)
36              stabilize;              stabilize;
37          t = t + stepSz;          t = t + stepSz;
         num = num + 1;  
38      }      }
39    
40      /* render: output maxval */      /* render: output maxval */
41  }  }
42    
43  initially [ RayCast(r, c) | r in 0..1023, c in 0..1023 ];  initially [ RayCast(r, c) | r in 0..199, c in 0..199 ];

Legend:
Removed from v.144  
changed lines
  Added in v.145

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