[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] gzz/gfx/util disp.py papersampler.py
From: |
Janne V. Kujala |
Subject: |
[Gzz-commits] gzz/gfx/util disp.py papersampler.py |
Date: |
Tue, 04 Mar 2003 08:13:00 -0500 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Janne V. Kujala <address@hidden> 03/03/04 08:13:00
Modified files:
gfx/util : disp.py papersampler.py
Log message:
randomize conditions
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/util/disp.py.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/util/papersampler.py.diff?tr1=1.16&tr2=1.17&r1=text&r2=text
Patches:
Index: gzz/gfx/util/disp.py
diff -u gzz/gfx/util/disp.py:1.6 gzz/gfx/util/disp.py:1.7
--- gzz/gfx/util/disp.py:1.6 Tue Mar 4 06:38:33 2003
+++ gzz/gfx/util/disp.py Tue Mar 4 08:13:00 2003
@@ -175,6 +175,7 @@
if not nextTrial():
print "End of exper"
+ log("Exper end\n")
System.exit(0)
class Main(Runnable):
Index: gzz/gfx/util/papersampler.py
diff -u gzz/gfx/util/papersampler.py:1.16 gzz/gfx/util/papersampler.py:1.17
--- gzz/gfx/util/papersampler.py:1.16 Tue Mar 4 03:57:58 2003
+++ gzz/gfx/util/papersampler.py Tue Mar 4 08:13:00 2003
@@ -60,13 +60,21 @@
{ "numcolors" : 1, "minlum" : 80 },
]
-textConds = [
+paperConds = [
{ "halo" : 0, "paperopts" : { "numcolors" : 8, "minlum" : 80 } },
{ "halo" : 1, "paperopts" : { "numcolors" : 8, "minlum" : 80, "blend" : 0
} },
{ "halo" : 0, "paperopts" : { "numcolors" : 8, "minlum" : 80, "blend" :
0.5 } },
{ "halo" : 0, "paperopts" : { "numcolors" : 8, "minlum" : 80, "blend" : 1
} },
]
+textConds = []
+for z in zoomLevels:
+ for pc in paperConds:
+ c = {}
+ c.update(pc)
+ c["zoom"] = z
+ textConds.append(c)
+
aspect = float(xs)/ys
enfMaker = gzz.media.impl.Enfilade1DImpl.Enfilade1DImplMaker()
@@ -77,7 +85,7 @@
pages = [enfMaker.makeEnfilade(current.subSpan(i, i+1)) for i in range(0,
current.length())]
-pages = pages[:12] # XXX:
+pages = pages[:16] # XXX:
textureSeeds = [i for i in range(523, 523+current.length())]
@@ -107,7 +115,7 @@
vs.put(background((.36, .84, 1.0)))
scene(vs)
w.renderStill(vs, 0)
- # saveanim.saveframe(filename, w)
+ saveanim.saveframe(filename, w)
java.lang.System.gc()
GL.freeQueue()
@@ -132,29 +140,40 @@
def createTextPapers():
+ trials = 32
+
for subj in range(0,2):
- zooms = zoomLevels + zoomLevels + zoomLevels
- rng.shuffle(zooms)
-
global textureSeeds
rng.shuffle(textureSeeds)
+
+ pagenums = range(0, len(pages))
+ rng.shuffle(pagenums)
+ pagenums = pagenums * 2
+
+ conditions1 = [ cond for cond in textConds ]
+ conditions2 = [ cond for cond in textConds ]
+ rng.shuffle(conditions1)
+ rng.shuffle(conditions2)
+ conditions = conditions1 + conditions2
+
pageSpanCellView = gzz.view.PageSpanCellView()
pageSpanCellView.pageSpanPaperMaker = PSPMaker()
- for p in range(0, len(pages)):
- page = pages[p]
- zoom = zooms.pop()
+ for trial in range(0, trials):
+ page = pages[pagenums[trial]]
+ opts = conditions[trial]
l = 0
- for opts in textConds:
- gzz.gfx.gl.PageSpanPaper.withHalo = opts["halo"]
- print "Using halo: ",gzz.gfx.gl.PageSpanPaper.withHalo
- gzz.gfx.gl.PageSpanPaper.paperMill = OptMill(
- ThePaperMill(), opts["paperopts"])
- gzz.gfx.gl.PageSpanPaper.paperMillWindow = w
- layout = pageSpanCellView.getLayout(page)
- doFrame(lambda vs: textPaperScene(vs, layout, zoom),
- "tmp/tmp_%s_%s_%s"%(subj, p, l))
- l += 1
+
+ zoom = opts["zoom"]
+ gzz.gfx.gl.PageSpanPaper.withHalo = opts["halo"]
+ print "Using halo: ",gzz.gfx.gl.PageSpanPaper.withHalo
+ gzz.gfx.gl.PageSpanPaper.paperMill = OptMill(
+ ThePaperMill(), opts["paperopts"])
+ gzz.gfx.gl.PageSpanPaper.paperMillWindow = w
+ layout = pageSpanCellView.getLayout(page)
+ doFrame(lambda vs: textPaperScene(vs, layout, zoom),
+ "tmp/tmp_%s_%s_%s"%(subj, trial, l))
+ l += 1
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gzz-commits] gzz/gfx/util disp.py papersampler.py,
Janne V. Kujala <=