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

SCM Repository

[diderot] Diff of /branches/charisee/ertest/vispaper/tiso3d/detiso3d.diderot
ViewVC logotype

Diff of /branches/charisee/ertest/vispaper/tiso3d/detiso3d.diderot

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

revision 3090, Tue Mar 17 19:46:26 2015 UTC revision 3102, Wed Mar 18 16:04:49 2015 UTC
# Line 4  Line 4 
4  ../../../bin/diderotc detiso3d.diderot \  ../../../bin/diderotc detiso3d.diderot \
5  && ./detiso3d \  && ./detiso3d \
6  && unu dice -i detiso3d.txt -a 0 -o ./ \  && unu dice -i detiso3d.txt -a 0 -o ./ \
7  && unu jhisto -i {0,1}.nrrd -b 400 400 -min -1.2 -1.2 -max 1.2 1.2 -t float | \  && unu jhisto -i {0,1}.nrrd -b 400 400 -min -30 -30 -max 30 30 -t float | \
8     unu 1op log1p | \     unu 1op log1p | \
9     unu quantize -b 8 -o tmp.png \     unu quantize -b 8 -o tmp.png \
10  && unu jhisto -i {1,2}.nrrd -b 400 400 -min -1.2 -1.2 -max 1.2 1.2 -t float | \  && unu jhisto -i {1,2}.nrrd -b 400 400 -min -30 -30 -max 30 30 -t float | \
11     unu 1op log1p | \     unu 1op log1p | \
12     unu quantize -b 8 | unu join -i tmp.png - -a 0 -o detiso3d.png \     unu quantize -b 8 | unu join -i tmp.png - -a 0 -o detiso3d.png \
13  && rm -f {0,1,2}.nrrd \  && rm -f {0,1,2}.nrrd \
14  && open detiso3d.png  && open detiso3d.png \
15    && unu jhisto -i detiso3d.txt -min -31 -31 -31 -max 31 31 31 -b 120 120 120 -t float \
16        | unu dnorm -i - \
17        | unu dist -th 0.5 \
18        | ~/hale/demo/iso -i -
19    
20  */  */
21    
22  field#2(3)[3,3] V= bspln3 ⊛ image("tball.nrrd");  field#2(3)[3,3] V= bspln3 ⊛ image("tball.nrrd");
23  field#2(3)[] F = det(V) - 0.02;  field#2(3)[] F = det(V) - 0.02;
24    
25    //field#1(3)[] V= bspln3 ⊛ image("tball-det.nrrd");
26    //field#1(3)[] F = V - 0.02;
27    
28  int grid = 50;  int grid = 30;
29  int stepsMax = 10;  int stepsMax = 30;
30  real epsilon = 0.0001;  real epsilon = 0.0001;
31    
32  strand RootFind(real xi,real xj, real xk) {  strand RootFind(real xi,real xj, real xk) {
# Line 28  Line 34 
34     int steps = 0;     int steps = 0;
35     update {     update {
36        // Stop if we're no longer inside or taken too many steps.        // Stop if we're no longer inside or taken too many steps.
37        if (!inside(x, V) || steps > stepsMax)        if (!inside(x, F) || steps >= stepsMax)
38           die;           stabilize;
39        // subsequent expressions are undefined if |∇F| is zero        // subsequent expressions are undefined if |∇F| is zero
40        if (|∇F(x)| == 0.0)        if (|∇F(x)| == 0.0)
41           die;           die;
# Line 43  Line 49 
49     }     }
50  }  }
51    
52  initially { RootFind(lerp(-2, 2, -0.5, ui, grid-0.5),  initially { RootFind(lerp(-30, 30, -0.5, ui, grid-0.5),
53                       lerp(-2, 2, -0.5, vi, grid-0.5),                       lerp(-30, 30, -0.5, vi, grid-0.5),
54                       lerp(-2, 2, -0.5, wi, grid-0.5))                       lerp(-30, 30, -0.5, wi, grid-0.5))
55              | wi in 0..(grid-1), vi in 0..(grid-1), ui in 0..(grid-1) };              | wi in 0..(grid-1), vi in 0..(grid-1), ui in 0..(grid-1) };

Legend:
Removed from v.3090  
changed lines
  Added in v.3102

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