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

# SCM Repository

[diderot] Annotation of /branches/lamont/test/paths-BUG.diderot
 [diderot] / branches / lamont / test / paths-BUG.diderot

# Annotation of /branches/lamont/test/paths-BUG.diderot

Revision 2081 - (view) (download)

 1 : glk 1905 2 : int reso = 3; 3 : 4 : strand trace(int aa, int bb) { 5 : int steps = 0; 6 : vec2 posInit = [lerp(-1.0, 1.0, 1.0, real(aa), real(reso)), 7 : lerp(-1.0, 1.0, 1.0, real(bb), real(reso))]; 8 : vec2 pos = posInit; 9 : int stepsMax = 1 + aa + reso*bb; 10 : output vec2{} path = {pos}; 11 : 12 : update { 13 : if (0 == steps) { 14 : /* HEY it would make a lot of sense to allow print() 15 : amongst the strand initialization statements */ 16 : print("trace(", aa, ",", bb, ")=>stepsMax=", stepsMax, ", posInit=", posInit, "\n"); 17 : } 18 : print(" (", aa, ",", bb, "): steps=", steps, ",pos=", pos, ")\n"); 19 : pos *= 1.01; 20 : path = path@pos; 21 : // BUG: path does not seem to be updated 22 : steps += 1; 23 : if (steps == stepsMax) { 24 : stabilize; 25 : } 26 : } 27 : } 28 : 29 : initially { trace(aa, bb) | bb in 1..reso, aa in 1..reso };

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