Home My Page Projects Code Snippets Project Openings diderot

# SCM Repository

[diderot] Diff of /branches/lamont/test/implicit-surface/unit-circle.diderot
 [diderot] / branches / lamont / test / implicit-surface / unit-circle.diderot

# Diff of /branches/lamont/test/implicit-surface/unit-circle.diderot

revision 2235, Fri Mar 1 23:04:50 2013 UTC revision 2236, Sat Mar 2 01:57:49 2013 UTC
# Line 10  Line 10
10  input int MAX_ITER = 200; // maximum number of steps in the program  input int MAX_ITER = 200; // maximum number of steps in the program
11  vec2 xDom = [-1,1];  vec2 xDom = [-1,1];
12  vec2 yDom = [-1,1];  vec2 yDom = [-1,1];
13  // HEY we need floor  real xSamples = floor((xDom[1] - xDom[0])/RR); // Lamont verify logic floor vs ceil here
14  int xSamples = floor((xDom[1] - xDom[0])/RR); // Lamont verify logic floor vs ceil here  real ySamples = floor((yDom[1] - yDom[0])/RR);
int ySamples = floor((yDom[1] - yDom[0])/RR);
15  vec4 qWinDim = [xDom[0],xDom[1],yDom[0],yDom[1]]; // i.e. [XMIN, XMAX, YMIN, YMAX]  (required for the query function)  vec4 qWinDim = [xDom[0],xDom[1],yDom[0],yDom[1]]; // i.e. [XMIN, XMAX, YMIN, YMAX]  (required for the query function)
16  vec2 qGridDim = [xSamples,ySamples];   // how many grid cells you want in each direction for the uniform grid (required for the query function)  vec2 qGridDim = [xSamples,ySamples];   // how many grid cells you want in each direction for the uniform grid (required for the query function)
17  vec2 qCellDim = [(xDom[1] - xDom[0])/xSamples,(yDom[1] - yDom[0])/ySamples];      // the length in each direction for a cell (required for the query function)  vec2 qCellDim = [(xDom[1] - xDom[0])/xSamples,(yDom[1] - yDom[0])/ySamples];      // the length in each direction for a cell (required for the query function)
# Line 20  Line 19
19
20  strand Particle (int ii, real posx, real posy) {  strand Particle (int ii, real posx, real posy) {
21      vec2 pos = normalize([posx,posy]);      vec2 pos = normalize([posx,posy]);
22      output vec2 outPos  = pos;  //    output vec2 outPos  = pos;
23      int id = ii;      int id = ii;
24      update {      update {
25
# Line 47  Line 46
46          vec2 step = hh*force/rr;          vec2 step = hh*force/rr;
47          pos = normalize(pos + step);          pos = normalize(pos + step);
48
49          outPos = pos;    //      outPos = pos;
50
51          if (iter >= MAX_ITER) {          if (iter >= MAX_ITER) {
52              stabilize;              stabilize;

Legend:
 Removed from v.2235 changed lines Added in v.2236