Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Annotation of /branches/tash/test/zslice1.diderot
ViewVC logotype

Annotation of /branches/tash/test/zslice1.diderot

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1927 - (view) (download)
Original Path: branches/vis12/test/zslice1.diderot

1 : jhr 1115 // zslice1.diderot
2 :    
3 :     int dataSize = 9;
4 :     int imgSize = 200;
5 :     vec3 orig = [0.0, 0.0, 4.0];
6 :     vec3 cVec = [0.0, 1.0, 0.0];
7 :     vec3 rVec = [1.0, 0.0, 0.0];
8 : jhr 1927 image(3)[] img = load ("../data/zimg.nrrd");
9 : jhr 1115 field#2(3)[] F = img ⊛ bspln3;
10 :    
11 :     strand RayCast (int row, int col)
12 :     {
13 :     real rr = lerp(-0.5, real(dataSize)-0.5, -0.5, real(row), real(imgSize)-0.5);
14 :     real cc = lerp(-0.5, real(dataSize)-0.5, -0.5, real(col), real(imgSize)-0.5);
15 :     vec3 pos = orig + rr*rVec + cc*cVec;
16 :     output real val = -∞;
17 :    
18 :     update
19 :     {
20 :     if (inside (pos,F)) {
21 :     val = 1.0;
22 :     }
23 :     stabilize;
24 :     }
25 :     }
26 :    
27 :     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