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

SCM Repository

[diderot] Diff of /branches/charisee_dev/examples/mode/mode-vr.diderot
ViewVC logotype

Diff of /branches/charisee_dev/examples/mode/mode-vr.diderot

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

revision 3306, Fri Oct 16 19:23:34 2015 UTC revision 3307, Fri Oct 16 19:41:04 2015 UTC
# Line 1  Line 1 
   
1  input real isoval = 0.9;  input real isoval = 0.9;
2  input real thick = 0.8;  input real thick = 0.8;
3    
 //field#2(3)[3,3] V = c4hexic ⊛ image("../data/slab-c4h-ten9.nrrd");  
4  field#2(3)[3,3] V = c4hexic ⊛ image("slab-c4h-ten9-small.nrrd");  field#2(3)[3,3] V = c4hexic ⊛ image("slab-c4h-ten9-small.nrrd");
5  field#2(3)[3,3] E = V - trace(V)*identity[3]/3;  field#2(3)[3,3] E = V - trace(V)*identity[3]/3;
6  field#2(3)[] F = 3*sqrt(6)*det(E/|E|);  field#2(3)[] F = 3*sqrt(6)*det(E/|E|);
   
   
7  field#0(1)[3] cmap = tent ⊛ image("diverg-cmap.nrrd");  field#0(1)[3] cmap = tent ⊛ image("diverg-cmap.nrrd");
8    
9  function vec3 color(vec3 x) = cmap(clamp(-1,1,F(x)/2));  function vec3 color(vec3 x) = cmap(clamp(-1,1,F(x)/2));
10    
11  input real refStep = 1;  input real refStep = 1;
   
12  input vec3 camEye = [-139.415, 396.62, 451.98];  input vec3 camEye = [-139.415, 396.62, 451.98];
13  input vec3 camAt = [128.432, 126.52, 219.103];  input vec3 camAt = [128.432, 126.52, 219.103];
14  input vec3 camUp = [-0.0213419, -0.0581629, 0.998079];  input vec3 camUp = [-0.0213419, -0.0581629, 0.998079];
# Line 25  Line 21 
21  input real phongKd = 0.7;  input real phongKd = 0.7;
22  input real rayStep = 0.4;  input real rayStep = 0.4;
23  input vec3 lightVsp = [-2.0, -3.5, -4.0];  input vec3 lightVsp = [-2.0, -3.5, -4.0];
   
 // (boilerplate) computation of camera and light info  
24  real camDist = |camAt - camEye|;  real camDist = |camAt - camEye|;
25  real camNear = camNearAtRel + camDist;  real camNear = camNearAtRel + camDist;
26  real camFar = camFarAtRel + camDist;  real camFar = camFarAtRel + camDist;
# Line 48  Line 42 
42    real transp = 1;    real transp = 1;
43    vec3 rgb = [0, 0, 0];    vec3 rgb = [0, 0, 0];
44    output vec4 rgba = [0, 0, 0, 0];    output vec4 rgba = [0, 0, 0, 0];
   
45    update {    update {
46      vec3 x = camEye + rayN*rayVec;      vec3 x = camEye + rayN*rayVec;
47      if (inside(x,V)) {      if (inside(x,V)) {

Legend:
Removed from v.3306  
changed lines
  Added in v.3307

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