SCM Repository
[diderot] / branches / charisee_dev / rtest / tests / convo2d1 / convo2d1.diderot |
View of /branches/charisee_dev/rtest/tests/convo2d1/convo2d1.diderot
Parent Directory
|
Revision Log
Revision 3269 -
(download)
(annotate)
Fri Oct 9 00:54:03 2015 UTC (6 years, 7 months ago) by cchiw
File size: 728 byte(s)
Fri Oct 9 00:54:03 2015 UTC (6 years, 7 months ago) by cchiw
File size: 728 byte(s)
dev branch
/*! \file convo2d1.diderot * * \author Gordon Kindlmann */ /* * COPYRIGHT (c) 2012 The Diderot Project (http://diderot-language.cs.uchicago.edu) * All rights reserved. */ int outSize = 201; field#1(2)[] F = ctmr ⊛ 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 vec3 out = [nan,nan,nan]; update { vec2 grad = ∇F(pos) if (inside(pos,F)) else [2000.0,0.0]; out = [grad[0], grad[1], |grad|]; 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 |