From 984d8ec198d8a494000b3b6bf14069bf781d1e8d Mon Sep 17 00:00:00 2001 From: Michael Fogleman Date: Wed, 14 Feb 2018 14:21:57 -0500 Subject: [PATCH] auto seed --- examples/rule.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/examples/rule.py b/examples/rule.py index 4ebfc3a..c6152a9 100644 --- a/examples/rule.py +++ b/examples/rule.py @@ -4,6 +4,7 @@ from shapely import geometry import axi import math import random +import time def circle(cx, cy, r, revs, points_per_rev): points = [] @@ -191,6 +192,8 @@ def label(text): return d def single(number, rule, seed): + if seed is None: + seed = int(time.time() * 1000) % 100000 path = '%d-%d-%d' % (number, rule, seed) random.seed(seed) # rule = 90 @@ -260,10 +263,12 @@ def multiple(): # axi.draw(d) def main(): - number = 26 + number = 29 rule = 90 - for seed in [3]: - single(number, rule, seed) + seed = None + single(number, rule, seed) + # for seed in range(10, 20): + # single(number, rule, seed) # multiple() if __name__ == '__main__':