From 1b1e0bfd1a5e9d88886b58b0d4db05cafbb36365 Mon Sep 17 00:00:00 2001 From: hanemile Date: Fri, 9 Feb 2018 13:42:24 +0100 Subject: added the spiral folder --- src/python/spiral/gen.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/python/spiral/gen.py (limited to 'src/python/spiral/gen.py') diff --git a/src/python/spiral/gen.py b/src/python/spiral/gen.py new file mode 100644 index 0000000..f9f6a0a --- /dev/null +++ b/src/python/spiral/gen.py @@ -0,0 +1,23 @@ +# general libraries +import numpy as np + +list_a = [] + +class spiral: + def __init__(self): + self.list_a = [] + + def print_list_a(self): + for value in self.list_a: + print(value) + + # def gen_stars(self, n, list_a) + + +# define a function generating n stars +def gen_stars(n, list_a): + for i in range(0, n): + list_a.append(np.random.random((3))) + +if __name__ == "__main__": + gen_stars(n) -- cgit 1.4.1