Files for the publication & poster for Data Workers, an exhibition by Algolit. http://www.algolit.net/index.php/Data_Workers
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

77 lines
1.3 KiB

from math import sqrt, log, log10
# Using a function to describe a circle
# Thanks J
def circulair_pattern():
line_width = 110
line_height = 70
out = ''
count = 0
for x in range(100):
for y in range(100):
if count == 10:
count = 0
z = sqrt((x ** 2) + (y ** 2))
z = int(z / 50)
print(z)
out += str(count) + (' ' * z)
count += 1
page = ''
linenumber = 0
for i, c in enumerate(out):
if i % line_width == 0:
range_start = linenumber * line_width
range_end = range_start + line_width
page += out[range_start:range_end] + '\n'
linenumber += 1
lines = page.split('\n')
page = '\n'.join(lines[:69]) + '\n'
f = open('pattern.txt', 'w+')
f.write(page)
f.close()
return page
circulair_pattern()
def new():
line_width = 110
line_height = 70
out = ''
count = 0
for x in range(100):
if count == 10:
count = 0
z = int(log10(4 * (x + 1)))
print(z)
out += str(count) + (' ' * z)
count += 1
out = out.replace(' ', ' ')
page = ''
linenumber = 0
for i, c in enumerate(out):
if i % line_width == 0:
range_start = linenumber * line_width
range_end = range_start + line_width
page += out[range_start:range_end] + '\n'
linenumber += 1
lines = page.split('\n')
page = '\n'.join(lines[:69]) + '\n'
f = open('pattern.txt', 'w+')
f.write(page)
f.close()
return page
# new()