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

SCM Repository

[diderot] Diff of /branches/pure-cfg/test/zslice1.diderot
ViewVC logotype

Diff of /branches/pure-cfg/test/zslice1.diderot

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

revision 769, Thu Apr 7 20:30:51 2011 UTC revision 770, Thu Apr 7 20:42:13 2011 UTC
# Line 11  Line 11 
11    
12  strand RayCast (int row, int col)  strand RayCast (int row, int col)
13  {  {
14      real rr = real(dataSize)*(real(row)+0.5)/real(imgSize) - 0.5;      real rr = lerp(-0.5, real(dataSize)-0.5, -0.5, real(row), real(imgSize)-0.5);
15      real cc = real(dataSize)*(real(col)+0.5)/real(imgSize) - 0.5;      real cc = lerp(-0.5, real(dataSize)-0.5, -0.5, real(col), real(imgSize)-0.5);
16      vec3 pos = orig + rr*rVec + cc*cVec;      vec3 pos = orig + rr*rVec + cc*cVec;
17      output real maxval = -∞;      output real val = -∞;
18    
19      update      update
20      {      {
        // HEY region for this should be exactly centered in the image  
21          if (inside (pos,F)) {          if (inside (pos,F)) {
22            maxval = 1.0;            val = 1.0;
23          }          }
24          stabilize;          stabilize;
25      }      }
   
     /* render: output maxval */  
26  }  }
27    
28  initially [ RayCast(r, c) | r in 0..(imgSize-1), c in 0..(imgSize-1) ];  initially [ RayCast(r, c) | r in 0..(imgSize-1), c in 0..(imgSize-1) ];

Legend:
Removed from v.769  
changed lines
  Added in v.770

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