mirror of
https://github.com/stevenrobertson/cuburn.git
synced 2025-10-31 17:30:46 -04:00
Add a few vars, and support for rendering single flames
This commit is contained in:
9
main.py
9
main.py
@ -32,21 +32,18 @@ from cuburn.code.iter import silly, membench
|
||||
|
||||
|
||||
def main(args):
|
||||
membench()
|
||||
return
|
||||
|
||||
#MWCTest.test_mwc()
|
||||
with open(args[-1]) as fp:
|
||||
genomes = Genome.from_string(fp.read())
|
||||
anim = Animation(genomes)
|
||||
accum, den = silly(anim.features, genomes)
|
||||
|
||||
if '-g' not in args:
|
||||
return
|
||||
|
||||
noalpha = np.delete(accum, 3, axis=2)
|
||||
scipy.misc.imsave('rendered.png', noalpha)
|
||||
|
||||
if '-g' not in args:
|
||||
return
|
||||
|
||||
imgbuf = (np.minimum(accum * 255, 255)).astype(np.uint8)
|
||||
|
||||
image = pyglet.image.ImageData(1024, 1024, 'RGBA', imgbuf.tostring(), -4096)
|
||||
|
||||
Reference in New Issue
Block a user