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

SCM Repository

[diderot] Diff of /branches/pure-cfg/test/vr-curv-quad.diderot
ViewVC logotype

Diff of /branches/pure-cfg/test/vr-curv-quad.diderot

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

revision 1385, Fri Jun 24 14:26:11 2011 UTC revision 1386, Fri Jun 24 14:44:35 2011 UTC
# Line 1  Line 1 
1  // vr-curv  // vr-curv-quad
2  //  //
3  // Demonstration of curvature-based transfer functions in volume rendering  // Demonstration of curvature-based transfer functions in volume rendering
4  //  //
5  // process output with:  // process output with:
6  // unu reshape -i mip.txt -s 4 480 345 | overrgb -i - -b 0.1 0.15 0.2 -g 1.2 -o - | unu quantize -b 8 -min 0 -max 255  -o vr-curv-quad.png  // unu reshape -i vr-curv-quad.txt -s 4 480 345 | overrgb -i - -b 0.1 0.15 0.2 -g 1.2 -o - | unu quantize -b 8 -min 0 -max 255  -o vr-curv-quad.png
7    
8  field#2(3)[] F = bspln3 ⊛ load("../data/quad-patches-pad.nrrd");  field#2(3)[] F = bspln3 ⊛ load("../data/quad-patches-pad.nrrd");
9  field#0(2)[3] RGB = tent ⊛ load("../data/txf/2d-bow.nrrd");  field#0(2)[3] RGB = tent ⊛ load("../data/txf/2d-bow.nrrd");
# Line 59  Line 59 
59                vec3 grad = -∇F(pos);                vec3 grad = -∇F(pos);
60                vec3 norm = normalize(grad);                vec3 norm = normalize(grad);
61                // begin curvature computation                // begin curvature computation
62                tensor[3,3] H = ∇(∇F)(pos);                tensor[3,3] H = ∇⊗∇F(pos);
63                tensor[3,3] P = identity[3] - norm⊗norm;                tensor[3,3] P = identity[3] - norm⊗norm;
64                tensor[3,3] G = -(P•H•P)/|grad|;                tensor[3,3] G = -(P•H•P)/|grad|;
65                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));

Legend:
Removed from v.1385  
changed lines
  Added in v.1386

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