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

SCM Repository

[diderot] Diff of /branches/charisee/ertest/vispaper/tiso3d/resamp.diderot
ViewVC logotype

Diff of /branches/charisee/ertest/vispaper/tiso3d/resamp.diderot

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3101, Wed Mar 18 16:03:42 2015 UTC revision 3102, Wed Mar 18 16:04:49 2015 UTC
# Line 4  Line 4 
4    
5  ../../../bin/diderotc resamp.diderot \  ../../../bin/diderotc resamp.diderot \
6   && ./resamp \   && ./resamp \
7   && unu reshape -i resamp.txt -s 30 30 30 | \   && unu reshape -i resamp.txt -s 60 60 60 | \
8      unu dnorm -o tmp.nrrd \      unu dnorm -o tmp.nrrd \
9   && unu minmax tmp.nrrd   && unu minmax tmp.nrrd
10    
11  */  */
12    
13  int sz0 = 30;  int sz0 = 60;
14  int sz1 = 30;  int sz1 = 60;
15  int sz2 = 30;  int sz2 = 60;
16  real width = 58;  real width = 59;
17  vec3 spc = [width/(sz0-1), width/(sz1-1), width/(sz2-1)];  vec3 spc = [width/(sz0-1), width/(sz1-1), width/(sz2-1)];
18    
19  vec3 pp = [0.0,0.0,0.0];  vec3 pp = [0.0,0.0,0.0];
# Line 22  Line 22 
22  vec3 zdir = [0.0, 0.0, spc[2]];  vec3 zdir = [0.0, 0.0, spc[2]];
23  vec3 orig = -(xdir*(sz0-1) + ydir*(sz1-1) + zdir*(sz2-1))/2;  vec3 orig = -(xdir*(sz0-1) + ydir*(sz1-1) + zdir*(sz2-1))/2;
24    
25  field#2(3)[3,3] V= bspln3 ⊛ image("tball.nrrd");  field#0(3)[3,3] V= tent ⊛ image("tball.nrrd");
26  field#2(3)[] func = det(V);  field#2(3)[3,3] E = V - trace(V)*identity[3,3]/3;
27    field#2(3)[] F = sqrt(3.0*E:E/(2.0*D:D));
28    
29  strand sample(int xi, int yi, int zi) {  strand sample(int xi, int yi, int zi) {
30    output real vv = 0;    output real vv = 0;
31    update {    update {
32      vec3 p  = orig + xi*xdir + yi*ydir + zi*zdir;      vec3 p  = orig + xi*xdir + yi*ydir + zi*zdir;
33      vv = func(p);      vv = F(p);
34      stabilize;      stabilize;
35    }    }
36  }  }

Legend:
Removed from v.3101  
changed lines
  Added in v.3102

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0