SCM Repository
[diderot] / branches / vis12 / rtest / tests / convo2d0-rgb / convo2d0-rgb.diderot |
View of /branches/vis12/rtest/tests/convo2d0-rgb/convo2d0-rgb.diderot
Parent Directory
|
Revision Log
Revision 1928 -
(download)
(annotate)
Sat Jun 23 18:09:34 2012 UTC (8 years, 8 months ago) by jhr
File size: 662 byte(s)
Sat Jun 23 18:09:34 2012 UTC (8 years, 8 months ago) by jhr
File size: 662 byte(s)
converting to use "image" instead of "load" for image nrrd loading
/*! \file convo2d0-rgb.diderot * * \author Gordon Kindlmann */ /* * COPYRIGHT (c) 2012 The Diderot Project (http://diderot-language.cs.uchicago.edu) * All rights reserved. */ int outSize = 200; field#0(2)[3] F = tent ⊛ image("../../data/ddro-115-rgb.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 vec3 out = [nan,nan,nan]; update { out = F(pos) if (inside(pos,F)) else [0.0,1.0,0.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 |