SCM Repository
[diderot] / branches / pure-cfg / test / fields.diderot |
View of /branches/pure-cfg/test/fields.diderot
Parent Directory
|
Revision Log
Revision 1028 -
(download)
(annotate)
Sun May 1 16:30:06 2011 UTC (9 years, 8 months ago) by glk
File size: 1543 byte(s)
Sun May 1 16:30:06 2011 UTC (9 years, 8 months ago) by glk
File size: 1543 byte(s)
numbering of remaining problems
// fields // // documents bugs in field expressions // process output with: // unu reshape -i mip.txt -s 2 300 200 | unu pad -min 0 0 0 -max 2 M M -b wrap | unu quantize -b 8 -o fields.png int imgSizeX = 300; int imgSizeY = 200; image(2)[2] Vimg = load("../data/vorttest.nrrd"); // (1) HEY (BUG) I thought we had scalar multiplication of fields? this: field#1(2)[2] Vpos = Vimg ⊛ ctmr; field#1(2)[2] V = 1.0*Vpos; // causes: // translate (V00E2, *001E, ...) // uncaught exception Fail [Fail: TranslateBasis.translate: unknown basis function *001E] // raised at translate/translate-basis.sml:192.41-192.43 // raised at translate/translate-basis.sml:189.22-189.100 // // (2) This also fails: // field#1(2)[2] V = 1.0*(Vimg ⊛ ctmr); // (3) HEY (BUG): can't seem to even assign fields! This also fails: //field#1(2)[2] Vpos = Vimg ⊛ ctmr; field#1(2)[2] V = Vpos; // (4) HEY (BUG): I thought we had addition of fields? This also fails: //field#1(2)[2] Vpos = Vimg ⊛ ctmr; field#1(2)[2] V = Vpos + Vpos; // NOTE: these bugs are a symptom of the mishandling of variable scoping. image(2)[] Rimg = load("../data/vorttest-rand.nrrd"); field#0(2)[] R = Rimg ⊛ tent; strand LIC (int xi, int yi) { real xx = lerp(0.0, 3.0, -0.5, real(xi), real(imgSizeX)-0.5); real yy = lerp(0.0, 2.0, -0.5, real(yi), real(imgSizeY)-0.5); vec2 pos = [xx,yy]; output vec2 v = [0.0,0.0]; update { v = V(pos); stabilize; } } initially [ LIC(xi, yi) | yi in 0..(imgSizeY-1), xi in 0..(imgSizeX-1) ];
root@smlnj-gforge.cs.uchicago.edu | ViewVC Help |
Powered by ViewVC 1.0.0 |