auto seed

This commit is contained in:
Michael Fogleman 2018-02-14 14:21:57 -05:00
parent 1b3c27e441
commit 984d8ec198
1 changed files with 8 additions and 3 deletions

View File

@ -4,6 +4,7 @@ from shapely import geometry
import axi import axi
import math import math
import random import random
import time
def circle(cx, cy, r, revs, points_per_rev): def circle(cx, cy, r, revs, points_per_rev):
points = [] points = []
@ -191,6 +192,8 @@ def label(text):
return d return d
def single(number, rule, seed): def single(number, rule, seed):
if seed is None:
seed = int(time.time() * 1000) % 100000
path = '%d-%d-%d' % (number, rule, seed) path = '%d-%d-%d' % (number, rule, seed)
random.seed(seed) random.seed(seed)
# rule = 90 # rule = 90
@ -260,10 +263,12 @@ def multiple():
# axi.draw(d) # axi.draw(d)
def main(): def main():
number = 26 number = 29
rule = 90 rule = 90
for seed in [3]: seed = None
single(number, rule, seed) single(number, rule, seed)
# for seed in range(10, 20):
# single(number, rule, seed)
# multiple() # multiple()
if __name__ == '__main__': if __name__ == '__main__':