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

SCM Repository

[diderot] Diff of /branches/vis15/src/tests/glk-tests/new/moe-vr-can2.diderot
ViewVC logotype

Diff of /branches/vis15/src/tests/glk-tests/new/moe-vr-can2.diderot

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

revision 4496, Sat Sep 3 13:52:11 2016 UTC revision 4497, Sat Sep 3 14:12:36 2016 UTC
# Line 1  Line 1 
1    #version 2
2    
3  // set camera, image, and rendering parameters  // set camera, image, and rendering parameters
4  input vec3 camEye = [-194.602, -4.82922, 910.873];  input vec3 camEye = [-194.602, -4.82922, 910.873];
# Line 15  Line 16 
16  input real phongKd = 0.7;  input real phongKd = 0.7;
17  input real thickness = 0.3;  input real thickness = 0.3;
18    
19  field#4(3)[] V = bspln5 ⊛ image("../data/moe-iso-b3i5-small.nrrd");  field#4(3)[] V = bspln5 ⊛ load_image("../data/moe-iso-b3i5-small.nrrd");
20    
21  field#2(3)[] S = ∇V/|∇V| • ∇⊗∇(|∇V|) • ∇V/|∇V|;  field#2(3)[] S = ∇V/|∇V| • ∇⊗∇(|∇V|) • ∇V/|∇V|;
22  field#2(3)[] F = -∇(|∇V|) • ∇V/|∇V|;  field#2(3)[] F = -∇(|∇V|) • ∇V/|∇V|;
23  input real smax = -10;  input real smax = -10;
24    
25  function real alpha(real v, real g) = clamp(0, 1, 1.3*(1 - |v|/(g*thickness)));  function real alpha(real v, real g) = clamp(0, 1, 1.3*(1 - |v|/(g*thickness)));
26  field#0(1)[3] cmap = tent ⊛ image("moe-isobow.nrrd");  field#0(1)[3] cmap = tent ⊛ load_image("moe-isobow.nrrd");
27  function vec3 color(vec3 x) = cmap(clamp(-1200,3300,V(x)));  function vec3 color(vec3 x) = cmap(clamp(-1200,3300,V(x)));
28  function real mask(vec3 x) = 1.0 if (S(x) < smax) else 0.0; // NOTISO  function real mask(vec3 x) = 1.0 if (S(x) < smax) else 0.0; // NOTISO
29    
# Line 74  Line 75 
75      if (a > 0) rgba = [rgb[0]/a, rgb[1]/a, rgb[2]/a, a];      if (a > 0) rgba = [rgb[0]/a, rgb[1]/a, rgb[2]/a, a];
76    }    }
77  }  }
78  grid(2) { raycast(ui, vi) | vi in 0..iresV-1, ui in 0..iresU-1 }  create_array { raycast(ui, vi) | vi in 0..iresV-1, ui in 0..iresU-1 }

Legend:
Removed from v.4496  
changed lines
  Added in v.4497

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