Home My Page Projects Code Snippets Project Openings diderot

# SCM Repository

 [diderot] / branches / pure-cfg / test / vr-curv-quad.diderot

revision 1078, Wed May 4 05:05:07 2011 UTC revision 1082, Wed May 4 08:12:24 2011 UTC
# Line 59  Line 59
60                // begin curvature computation                // begin curvature computation
61                tensor[3,3] H = ∇(∇F)(pos);                tensor[3,3] H = ∇(∇F)(pos);
62                tensor[3,3] P = identity[3] - norm⊗norm;                // HEY (BUG) replace with: identity[3] - norm⊗norm
63                  // when 3x3 matrix subtraction is working
64                  tensor[3,3] P = identity[3] + (-1.0*norm⊗norm);
66                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));
67                real k1 = (trace(G) + disc)/2.0;                real k1 = (trace(G) + disc)/2.0;
68                real k2 = (trace(G) - disc)/2.0;                real k2 = (trace(G) - disc)/2.0;
69                // finished curvature computation; begin finding sample RGBA                // finished curvature computation; begin finding sample RGBA
70                k1 = max(-1.0, min(1.0, 4.2*k1));                k1 = max(-1.0, min(1.0, 5.0*k1));
71                k2 = max(-1.0, min(1.0, 4.2*k2));                k2 = max(-1.0, min(1.0, 5.0*k2));
72                vec3 matRGB = RGB([k1,k2]);                vec3 matRGB = RGB([k1,k2]);
73                real alpha = min(1.0, lerp(0.0, 1.0,                real alpha = min(1.0, lerp(0.0, 1.0,
74                                           valOpacMin, val, valOpacMax));                                           valOpacMin, val, valOpacMax));

Legend:
 Removed from v.1078 changed lines Added in v.1082