def export_results(self, pngvin_dir):
        from wgui import wlayermanager

        print "Exporting results as PNGVIN video to %s" % (pngvin_dir)
        wl = wlayermanager()
        wl.add_layer(self.video)
        map(wl.add_layer, self.animators)
        wl.exportPNGVIN(pngvin_dir)
        print "Export complete."
        print
Example #2
0
from wgui import wwindow,wlayermanager
from wmedia import wvideo,testscreen

import math
import numpy
import pylab

from common import make_video_path

from wview.gwhisker import GWhiskerLayer 


#selftest
if __name__=="__main__":
    layermanager = wlayermanager()
    tries = 8

    testrange=range(-tries,tries+1)

    whisker3=wvideo(map(lambda b:
        GWhiskerLayer((float(b*(16/float(tries)))/(512**2),0,0,0),rotation=0,translate=(256.,256.)),testrange),alpha=0.3)
    whisker2=wvideo(map(lambda b:
        GWhiskerLayer((0,float(b*(16/float(tries)))/512,0,0),rotation=0,translate=(256.,256.)),testrange),alpha=0.3)
    whisker1=wvideo(map(lambda b:
        GWhiskerLayer((0,0,float(b*(16/float(tries)))/8,0),rotation=0,translate=(256.,256.)),testrange),alpha=0.3)
    zero=wvideo(map(lambda b:
        GWhiskerLayer((0,0,0,0),rotation=0.,translate=(256.,256.)),testrange),alpha=0.3)
    
    x1=numpy.array(map(lambda b:float(b*(16/float(tries)))/(512**2),testrange))
    x2=numpy.array(map(lambda b:float(b*(16/float(tries)))/512,testrange))