SCM Repository
View of /trunk/rtest/tests/convo2d0/convo2d0.diderot
Parent Directory
|
Revision Log
Revision 3349 -
(download)
(annotate)
Tue Oct 27 15:16:36 2015 UTC (6 years, 8 months ago) by jhr
File size: 689 byte(s)
Tue Oct 27 15:16:36 2015 UTC (6 years, 8 months ago) by jhr
File size: 689 byte(s)
making copyrights consistent for all code in the repository
/*! \file convo2d0.diderot * * \author Gordon Kindlmann */ /* * This code is part of the Diderot Project (http://diderot-language.cs.uchicago.edu) * * COPYRIGHT (c) 2015 The University of Chicago * All rights reserved. */ int outSize = 200; field#0(2)[] F = tent ⊛ image("../../data/ddro-115.nrrd"); strand sample (int ui, int vi) { real uu = lerp(0.0, 1.0, -0.5, real(ui), real(outSize)-0.5); real vv = lerp(0.0, 1.0, -0.5, real(vi), real(outSize)-0.5); vec2 pos = [uu, vv]; output real val = -1.0; update { val = F(pos) if (inside(pos,F)) else -1.0; stabilize; } } initially [ sample(ui, vi) | vi in 0..(outSize-1), ui in 0..(outSize-1) ];
root@smlnj-gforge.cs.uchicago.edu | ViewVC Help |
Powered by ViewVC 1.0.0 |