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 2962, Thu Mar 5 15:12:00 2015 UTC revision 2965, Thu Mar 5 18:25:43 2015 UTC
# Line 6  Line 6 
6   * Test the border control features.   * Test the border control features.
7   */   */
8    
9  input image(2)[] Img;  input image(2)[3] Img = image("../data/mandril.nrrd");
10    
11  //field#0(2)[] T = tent ⊛ Img;  //field#0(2)[3] T = tent ⊛ Img;
12  field#0(2)[] Tb = tent ⊛ border(Img, 0.0);  field#0(2)[3] Tb = tent ⊛ border(Img, 0.0);
13  field#0(2)[] Tc = tent ⊛ clamp(Img);  field#0(2)[3] Tc = tent ⊛ clamp(Img);
14  field#0(2)[] Tm = tent ⊛ mirror(Img);  field#0(2)[3] Tm = tent ⊛ mirror(Img);
15  field#0(2)[] Tw = tent ⊛ wrap(Img);  field#0(2)[3] Tw = tent ⊛ wrap(Img);
16  int{2} sz = size(Img);  int{2} sz = size(Img);
17    
18  strand Sample (vec2 pos)  strand Sample (vec2 pos)
19  {  {
20      output real txtb = nan;      output vec3 txtb = nan;
21      output real txtc = nan;      output vec3 txtc = nan;
22      output real txtm = nan;      output vec3 txtm = nan;
23      output real txtw = nan;      output vec3 txtw = nan;
24    
25      update {      update {
26          txtb = Tb(pos);          txtb = Tb(pos);
# Line 31  Line 31 
31      }      }
32  }  }
33    
34  initially [ Sample([real(i), real(j)]) | i in -sz{0} .. 2*sz{0}, j in -sz{0} .. 2*sz{0} ];  initially [ Sample([real(i), real(j)]) | i in -sz{0} .. 2*sz{0}, j in -sz{1} .. 2*sz{1} ];

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

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