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

SCM Repository

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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2962 - (view) (download)
Original Path: branches/vis12/test/border-test.diderot

1 : jhr 2962 /* border-test.diderot
2 :     *
3 :     * COPYRIGHT (c) 2015 The Diderot Project (http://diderot-language.cs.uchicago.edu)
4 :     * All rights reserved.
5 :     *
6 :     * Test the border control features.
7 :     */
8 :    
9 :     input image(2)[] Img;
10 :    
11 :     //field#0(2)[] T = tent ⊛ Img;
12 :     field#0(2)[] Tb = tent ⊛ border(Img, 0.0);
13 :     field#0(2)[] Tc = tent ⊛ clamp(Img);
14 :     field#0(2)[] Tm = tent ⊛ mirror(Img);
15 :     field#0(2)[] Tw = tent ⊛ wrap(Img);
16 :     int{2} sz = size(Img);
17 :    
18 :     strand Sample (vec2 pos)
19 :     {
20 :     output real txtb = nan;
21 :     output real txtc = nan;
22 :     output real txtm = nan;
23 :     output real txtw = nan;
24 :    
25 :     update {
26 :     txtb = Tb(pos);
27 :     txtc = Tc(pos);
28 :     txtm = Tm(pos);
29 :     txtw = Tw(pos);
30 :     stabilize;
31 :     }
32 :     }
33 :    
34 :     initially [ Sample([real(i), real(j)]) | i in -sz{0} .. 2*sz{0}, j in -sz{0} .. 2*sz{0} ];

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