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

SCM Repository

[diderot] Diff of /tests/vis15-bugs/halftone-bug.diderot
ViewVC logotype

Diff of /tests/vis15-bugs/halftone-bug.diderot

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

revision 4704, Thu Oct 6 18:24:09 2016 UTC revision 4705, Thu Oct 6 18:34:41 2016 UTC
# Line 1  Line 1 
1    
2  vec2{} ipos = {[0,0],[0,0.1]};  vec2{} ipos = {[0,0],[0,0.1]};
3  input vec2 radmm ("particle minimum > 0 and maximum radius") = [0.01, 0.1];  input vec2 radmm ("particle minimum > 0 and maximum radius") = [0.01, 0.1];
 input real eps ("system convergence threshold, computed as the coefficient-of-variation of normalized distances to nearest neighbors") = 0.05;  
4  input int pcp ("periodicity of population control (if greater than zero)") = 2;  input int pcp ("periodicity of population control (if greater than zero)") = 2;
5  input real hhInit ("initial step size for potential energy gradient descent") = 1;  input real hhInit ("initial step size for potential energy gradient descent") = 1;
6    
# Line 38  Line 37 
37     return 1 if (iter/pcp) % 2 == 0 else -1;     return 1 if (iter/pcp) % 2 == 0 else -1;
38  }  }
39    
   
40  /* The particle is initialized at position pos0, with initial stepsize hh0.  /* The particle is initialized at position pos0, with initial stepsize hh0.
41     The first set of particles gets hhInit for the initial stepsize, but new     The first set of particles gets hhInit for the initial stepsize, but new
42     particles created by population control benefit from getting the stepsize     particles created by population control benefit from getting the stepsize
# Line 150  Line 148 
148           "; mean(ncount)=", meanncount,           "; mean(ncount)=", meanncount,
149           "; max(undone)=", maxundone, "\n");           "; max(undone)=", maxundone, "\n");
150    
151     if (covcl < eps           // seem to be geometrically uniform     if (iter > 10) {
        && maxundone < 0.5) { // and no particle recently set undone=1  
       print("Stabilizing ", numActive(), " points with COV(closest) ", covcl,  
             " < ", eps, " and maxundone ", maxundone, " < 0.5 (iter ", iter, ")\n");  
152        stabilize;        stabilize;
153     }     }
154     iter += 1;     iter += 1;

Legend:
Removed from v.4704  
changed lines
  Added in v.4705

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