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

SCM Repository

[diderot] View of /tests/vis12-bugs/src/bug040.diderot
ViewVC logotype

View of /tests/vis12-bugs/src/bug040.diderot

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4640 - (download) (annotate)
Tue Sep 27 20:54:47 2016 UTC (2 years, 10 months ago) by glk
File size: 736 byte(s)
initial result of svn export --username anonsvn --password=anonsvn https://svn.smlnj-gforge.cs.uchicago.edu/svn/diderot/branches/vis15/src/tests/
/* bug040.diderot
 *
 * This code is part of the Diderot Project (http://diderot-language.cs.uchicago.edu)
 *
 * COPYRIGHT (c) 2015 The University of Chicago
 * All rights reserved.
 *
 * The avoidance of redundant Inside tests is not working.
 */

input image(2)[3] Img = image("../data/mandrill.nrrd");

//field#0(2)[3] T = tent ⊛ Img;
field#0(2)[3] Tc = tent ⊛ clamp(Img);
int{2} sz = size(Img);

strand Sample (vec2 pos)
{
    output vec3 txtc = zeros[3];

    update {
        if (inside(pos, Tc)) {
 	  // shouldn't need an Inside test for this probe
	    txtc = Tc(pos);
	} else {
	    txtc = [0.0, 0.0, 1.0];
	}
	stabilize;
    }
}

initially [ Sample([real(i), real(j)]) | i in -sz{0} .. 2*sz{0}, j in -sz{1} .. 2*sz{1} ];

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