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

SCM Repository

[diderot] View of /branches/vis12/bugs/open/bug040.diderot
ViewVC logotype

View of /branches/vis12/bugs/open/bug040.diderot

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3291 - (download) (annotate)
Wed Oct 14 21:25:00 2015 UTC (4 years, 8 months ago) by jhr
File size: 740 byte(s)
code is copyright University of Chicago
/* 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