SCM Repository
View of /branches/staging/rtest/tests/convo3d0/convo3d0.diderot
Parent Directory
|
Revision Log
Revision 1934 -
(download)
(annotate)
Fri Jun 29 20:02:12 2012 UTC (10 years ago) by jhr
File size: 736 byte(s)
Fri Jun 29 20:02:12 2012 UTC (10 years ago) by jhr
File size: 736 byte(s)
merging changes from vis12 branch
/*! \file convo3d0.diderot * * \author Gordon Kindlmann */ /* * COPYRIGHT (c) 2012 The Diderot Project (http://diderot-language.cs.uchicago.edu) * All rights reserved. */ int outSize = 50; field#0(3)[] F = tent ⊛ image("../../data/ring.nrrd"); strand sample (int ui, int vi, int wi) { real uu = lerp(-1.0, 1.0, -0.5, real(ui), real(outSize)-0.5); real vv = lerp(-1.0, 1.0, -0.5, real(vi), real(outSize)-0.5); real ww = lerp(-1.0, 1.0, -0.5, real(wi), real(outSize)-0.5); vec3 pos = [uu, vv, ww]; output real out = -0.6; update { out = F(pos) if (inside(pos,F)) else -0.6; stabilize; } } initially [ sample(ui, vi, wi) | wi in 0..(outSize-1), vi in 0..(outSize-1), ui in 0..(outSize-1) ];
root@smlnj-gforge.cs.uchicago.edu | ViewVC Help |
Powered by ViewVC 1.0.0 |