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

SCM Repository

[diderot] Diff of /branches/fem/test/border-test.diderot
ViewVC logotype

Diff of /branches/fem/test/border-test.diderot

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

revision 2965, Thu Mar 5 18:25:43 2015 UTC revision 2975, Fri Mar 6 16:31:31 2015 UTC
# Line 6  Line 6 
6   * Test the border control features.   * Test the border control features.
7   */   */
8    
9  input image(2)[3] Img = image("../data/mandril.nrrd");  input image(2)[3] Img = image("../data/mandrill.nrrd");
10    
11  //field#0(2)[3] T = tent ⊛ Img;  //field#0(2)[3] T = tent ⊛ Img;
12  field#0(2)[3] Tb = tent ⊛ border(Img, 0.0);  field#0(2)[3] Tb = tent ⊛ border(Img, [0.0, 0.0, 0.0]);
13  field#0(2)[3] Tc = tent ⊛ clamp(Img);  field#0(2)[3] Tc = tent ⊛ clamp(Img);
14  field#0(2)[3] Tm = tent ⊛ mirror(Img);  field#0(2)[3] Tm = tent ⊛ mirror(Img);
15  field#0(2)[3] Tw = tent ⊛ wrap(Img);  field#0(2)[3] Tw = tent ⊛ wrap(Img);
16    field#0(2)[3] Tww = tent ⊛ wrap(wrap(Img));  // should be the sams as Tw
17  int{2} sz = size(Img);  int{2} sz = size(Img);
18    
19  strand Sample (vec2 pos)  strand Sample (vec2 pos)
20  {  {
21      output vec3 txtb = nan;      output vec3 txtb = zeros[3]; // TODO: change to nan[3]
22      output vec3 txtc = nan;      output vec3 txtc = zeros[3];
23      output vec3 txtm = nan;      output vec3 txtm = zeros[3];
24      output vec3 txtw = nan;      output vec3 txtw = zeros[3];
25        output vec3 txtx = zeros[3];
26    
27      update {      update {
28          txtb = Tb(pos);          txtb = Tb(pos);
29          txtc = Tc(pos);          txtc = Tc(pos);
30          txtm = Tm(pos);          txtm = Tm(pos);
31          txtw = Tw(pos);          txtw = Tw(pos);
32            if (inside(pos, Tww)) {
33                txtx = Tww(pos);
34            } else {
35                txtx = [0.0, 0.0, 1.0];
36            }
37          stabilize;          stabilize;
38      }      }
39  }  }

Legend:
Removed from v.2965  
changed lines
  Added in v.2975

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