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

SCM Repository

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

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

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

revision 725, Fri Apr 1 23:02:38 2011 UTC revision 768, Thu Apr 7 20:28:46 2011 UTC
# Line 10  Line 10 
10    
11  strand sample (int ui, int vi)  strand sample (int ui, int vi)
12  {  {
13      real uu = real(dataSize)*(real(ui)+0.5)/real(imgSize) - 0.5;      vec2 pos = [lerp(-0.5, real(dataSize)-0.5, -0.5, real(ui), real(imgSize)-0.5),
14      real vv = real(dataSize)*(real(vi)+0.5)/real(imgSize) - 0.5;                  lerp(-0.5, real(dataSize)-0.5, -0.5, real(vi), real(imgSize)-0.5)];
     vec2 pos = [uu,vv];  
     //output real val = -∞;  
15      output vec3 vxy = [0.0,0.0,0.0];      output vec3 vxy = [0.0,0.0,0.0];
16    
17      update      update
18      {      {
19          if (inside(pos,F)) {          if (inside(pos,F)) {
           real f = F@pos;  
20            vec2 grad = ∇F@pos;            vec2 grad = ∇F@pos;
21            // HEY (BUG) what happened to vector indexing?            vxy = [0.1 if F@pos > 0.01 else 0.0, grad[0], grad[1]];
           vxy = [0.1 if f > 0.01 else 0.0, grad[0], grad[1]];  
           //vxy = [0.1 if f > 0.01 else 0.0, dot(grad, [1.0,0.0]), dot(grad, [0.0,1.0])];  
22          }          }
23          stabilize;          stabilize;
24      }      }

Legend:
Removed from v.725  
changed lines
  Added in v.768

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