SCM Repository
[diderot] / branches / pure-cfg / test / vr.diderot |
View of /branches/pure-cfg/test/vr.diderot
Parent Directory
|
Revision Log
Revision 477 -
(download)
(annotate)
Sat Nov 13 16:02:07 2010 UTC (10 years, 3 months ago) by jhr
File size: 700 byte(s)
Sat Nov 13 16:02:07 2010 UTC (10 years, 3 months ago) by jhr
File size: 700 byte(s)
Creating a branch to explore a pure CFG IL
// vr.diderot // // volume rendering example in Diderot // input string dataFile; // name of dataset input real stepSz; // size of steps input vec<3> light; input int wid = 640; input int ht = 480; image[3] img = load (dataFile); field#1[3] F = convolve (bspln3, img); actor RayCast (int row, int col) { vec<3> dir = (real(row), real(col), 0.0); vec<3> pos = (0.0, 0.0, 0.0); real t = 0.0; real[4] color = (0.0, 0.0, 0.0, 0.0); update { vec<3> pt = pos + t*dir; t = t + stepSz; vec<3> g = (D F)@pt; color = over(color, phong(light, g, txf(F@pt))); if (color[3] >= 0.999) stabilize; } } initially [ RayCast(r, c) | r in 0 .. ht-1, c in 0 .. wid-1 ];
root@smlnj-gforge.cs.uchicago.edu | ViewVC Help |
Powered by ViewVC 1.0.0 |