SCM Repository
[diderot] / branches / pure-cfg / test / zslice-2dd.diderot |
View of /branches/pure-cfg/test/zslice-2dd.diderot
Parent Directory
|
Revision Log
Revision 816 -
(download)
(annotate)
Wed Apr 13 18:18:40 2011 UTC (9 years, 10 months ago) by glk
File size: 741 byte(s)
Wed Apr 13 18:18:40 2011 UTC (9 years, 10 months ago) by glk
File size: 741 byte(s)
bug in dot?
int dataSize = 11; int imgSize = 200; vec3 orig = [0.0, 0.0, 5.0]; vec3 cVec = [0.0, 1.0, 0.0]; vec3 rVec = [1.0, 0.0, 0.0]; image(3)[] img = load("../data/zimg11.nrrd"); field#2(3)[] F = img ⊛ bspln3; strand RayCast (int row, int col) { real rr = lerp(-0.5, real(dataSize)-0.5, -0.5, real(row), real(imgSize)-0.5); real cc = lerp(-0.5, real(dataSize)-0.5, -0.5, real(col), real(imgSize)-0.5); vec3 pos = orig + rr*rVec + cc*cVec; output real val = 0.0; update { if (inside (pos,F)) { tensor[3,3] H = ∇(∇F)@pos; vec3 n = normalize(∇F@pos); val = n • H • n; } stabilize; } } initially [ RayCast(r, c) | r in 0..(imgSize-1), c in 0..(imgSize-1) ];
root@smlnj-gforge.cs.uchicago.edu | ViewVC Help |
Powered by ViewVC 1.0.0 |