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

SCM Repository

[diderot] Diff of /branches/charisee/ertest/vispaper/iso3d/cniso3d.diderot
ViewVC logotype

Diff of /branches/charisee/ertest/vispaper/iso3d/cniso3d.diderot

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

revision 2963, Thu Mar 5 15:15:55 2015 UTC revision 2964, Thu Mar 5 18:06:54 2015 UTC
# Line 17  Line 17 
17  field#2(3)[3,3] H = ∇⊗∇V;  field#2(3)[3,3] H = ∇⊗∇V;
18  field#2(3)[] F = G•H•G/|G|;  field#2(3)[] F = G•H•G/|G|;
19    
20  int grid = 30;  input int grid = 30;
21  int stepsMax = 10;  int stepsMax = 10;
22  real epsilon = 0.0001;  real epsilon = 0.0001;
23    
# Line 32  Line 32 
32        if (|∇F(x)| == 0.0)        if (|∇F(x)| == 0.0)
33           die;           die;
34        // ALSO, for canny, bail if gradient magnitude is too low        // ALSO, for canny, bail if gradient magnitude is too low
35        if (|∇V(x)| < 5)        if (|∇V(x)| < 4)
36           die;           die;
37        // the Newton-Raphson step        // the Newton-Raphson step
38        vec3 delta = normalize(∇F(x)) * F(x)/|∇F(x)|;        vec3 delta = normalize(∇F(x)) * F(x)/|∇F(x)|;
39        // we've converged if the change is small enough        // we've converged if the change is small enough
40        if (|delta| < epsilon)        if (|delta| < epsilon)
41           stabilize;           stabilize;
42          print( xi, ",", xj, ",", xk, ": ", x, " -= ", delta, "(step ", steps, ")\n");
43        x -= delta;        x -= delta;
44        steps += 1;        steps += 1;
45     }     }

Legend:
Removed from v.2963  
changed lines
  Added in v.2964

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