Home My Page Projects Code Snippets Project Openings diderot

# SCM Repository

[diderot] Diff of /trunk/test/tracto.diderot
 [diderot] / trunk / test / tracto.diderot

# Diff of /trunk/test/tracto.diderot

revision 3063, Sat Mar 14 13:37:57 2015 UTC revision 3064, Sat Mar 14 13:38:34 2015 UTC
# Line 21  Line 21
21      vec3        pos = seedPoint;      vec3        pos = seedPoint;
22      //// principleEvec : tensor[3,3] -> vec3      //// principleEvec : tensor[3,3] -> vec3
23      //// * : real x vec3 -> vec3      //// * : real x vec3 -> vec3
24      vec3        guide = real(seedSign) * principleEvec(F@seedPoint);      vec3        guide = real(seedSign) * principleEvec(F(seedPoint));
25      real        aniso = 0.0;      real        aniso = 0.0;
26
27      update      update
28      {      {
29          if (inside (pos,F)) {          if (inside (pos,F)) {
30             //// @ : field x vec -> tensor[3,3]             //// @ : field x vec -> tensor[3,3]
31             tensor[3,3] ten = F@pos;             tensor[3,3] ten = F(pos);
32             //// CL : tensor[3,3] -> real             //// CL : tensor[3,3] -> real
33             aniso = CL(ten);  // "CL" is a linear anisotropy measure             aniso = CL(ten);  // "CL" is a linear anisotropy measure
34             //// < : real x real -> bool             //// < : real x real -> bool
# Line 44  Line 44
44             //// * : real x real -> real             //// * : real x real -> real
45             //// * : real x vec3 -> vec3             //// * : real x vec3 -> vec3
46             //// + : vec3 x vec3 -> vec3             //// + : vec3 x vec3 -> vec3
47             evec = principleEvec(F @ (pos + 0.5*stepSz*evec));             evec = principleEvec(F  (pos + 0.5*stepSz*evec));
48             if (dot(evec, guide) < 0.0) { evec = -evec; } // fix eigenvector sign             if (dot(evec, guide) < 0.0) { evec = -evec; } // fix eigenvector sign
49             guide = evec;             guide = evec;
50             pos = pos + stepSz*evec;             pos = pos + stepSz*evec;
# Line 62  Line 62
62          }          }
63      }      }
64

65  }  }
66
67    initially [ LIC(xi, yi) | yi in 0..(imgSizeY-1), xi in 0..(imgSizeX-1) ];
68

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