-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgen.py
More file actions
43 lines (22 loc) · 735 Bytes
/
gen.py
File metadata and controls
43 lines (22 loc) · 735 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
class axis(object):
def __init__(self, name, min, max, step):
self.name = name
self.min = min
self.max = max
self.step = step
class array_manager(object):
def __init__(self, axes, generate):
self.axes = axes
self.generate = generate
def step(self):
self.generate()
return array
class generate_2d(object):
"fills in array with data to be displays"
def generate(data):
for x in xrange(data.x_min, data.x_max, data.x_step):
for y in xrange(data.y_min, data.y_max, data.y_step):
data.data[x][y] = self.function(x, y, data)
class color_space(generate_2d):
def function(self, x, y, data):
return 255