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

SCM Repository

[diderot] Diff of /branches/charisee/test/zslice-k1k2.diderot
ViewVC logotype

Diff of /branches/charisee/test/zslice-k1k2.diderot

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

revision 3062, Sat Mar 14 02:22:22 2015 UTC revision 3063, Sat Mar 14 13:37:57 2015 UTC
# Line 9  Line 9 
9  vec3 orig = [0.0, 0.0, 10.0];  vec3 orig = [0.0, 0.0, 10.0];
10  vec3 uVec = [1.0, 0.0, 0.0];  vec3 uVec = [1.0, 0.0, 0.0];
11  vec3 vVec = [0.0, 1.0, 0.0];  vec3 vVec = [0.0, 1.0, 0.0];
12  field#2(3)[] F = load("../data/quad-patches-pad.nrrd") ⊛ bspln3;  field#2(3)[] F = image("../data/quad-patches-pad.nrrd") ⊛ bspln3;
13    field#0(2)[3] RGB = image("../data/txf/2d-bow.nrrd") ⊛ tent;
 field#0(2)[3] RGB = load("../data/txf/2d-bow.nrrd") ⊛ tent;  
14    
15  strand sample (int ui, int vi)  strand sample (int ui, int vi)
16  {  {
# Line 27  Line 26 
26             // the "if (g[2] > 0.10)" test is specific to this dataset;             // the "if (g[2] > 0.10)" test is specific to this dataset;
27             // it is true when within one of the quadratic patches             // it is true when within one of the quadratic patches
28             if (g[2] > 0.10) {             if (g[2] > 0.10) {
   
29                vec3 n = normalize(g);                vec3 n = normalize(g);
30                tensor[3,3] H = -∇⊗(∇F)(pos);                tensor[3,3] H = -∇⊗(∇F)(pos);
31                tensor[3,3] P = identity[3] - n⊗n;                tensor[3,3] P = identity[3] - n⊗n;
32                tensor[3,3] G = (P•H•P)/|g|;                tensor[3,3] G = (P•H•P)/|g|;
33                real disc = max(0.0, sqrt(2.0*|G|^2 - trace(G)^2));                real disc = max(0.0, sqrt(2.0*|G|^2 - trace(G)^2));
   
34                real k1 = (trace(G) + disc)/2.0;                real k1 = (trace(G) + disc)/2.0;
35                real k2 = (trace(G) - disc)/2.0;                real k2 = (trace(G) - disc)/2.0;
36                // correct curvature computation ends here                // correct curvature computation ends here

Legend:
Removed from v.3062  
changed lines
  Added in v.3063

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