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

SCM Repository

[diderot] View of /tests/vis12-bugs/src/bug022.diderot
ViewVC logotype

View of /tests/vis12-bugs/src/bug022.diderot

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4640 - (download) (annotate)
Tue Sep 27 20:54:47 2016 UTC (2 years, 10 months ago) by glk
File size: 919 byte(s)
initial result of svn export --username anonsvn --password=anonsvn https://svn.smlnj-gforge.cs.uchicago.edu/svn/diderot/branches/vis15/src/tests/
/*
** BUG with empty sequences
**
**	../../bin/diderotc bug022.diderot 
**	uncaught exception Fail [Fail: empty sequence not supported yet]
**	  raised at common/phase-timer.sml:76.50-76.52
**	  raised at common/phase-timer.sml:76.50-76.52
**	  raised at simplify/simple.sml:112.34-112.73
**
*/
field#0(2)[2] vv = tent ⊛ image("../data/testvec4.nrrd");

vec2 {} pos0s = {[0.4,0],[-0.4,0]};
int pos0Num = length(pos0s);

int iterNum = 40;
real hh = 0.04;

strand sline(vec2 pos0) {
  vec2 posUp = pos0;
  vec2 posDn = pos0;
  output vec2{} pathUp = {};
  vec2{} pathDn = {};
  int iter = 0;

  update {
    if (inside(posUp, vv)) {
      pathUp = pathUp @ posUp;
      posUp -= hh*vv(posUp);
    }
    if (inside(posDn, vv)) {
      pathDn = pathDn @ posDn;
      posDn += hh*vv(posDn);
    }
    iter += 1;
    if (iter > iterNum) {
       stabilize;
    }
  }
}

initially [ sline(pos0s{ii}) | ii in 0..pos0Num-1 ];

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