Skip to content

Commit

Permalink
add logo
Browse files Browse the repository at this point in the history
  • Loading branch information
connormcmonigle committed Oct 18, 2020
1 parent 5548dc4 commit 1560fe0
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
Binary file added logo/logo_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions logo/logo_gen.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import math
from PIL import Image
import numpy as np

def weierstrass_sin(x, depth=10):
return sum(map(lambda i: (2**-i) * math.sin(2**i * x), range(depth)))


def weierstrass_cos(x, depth=10):
return sum(map(lambda i: (2**-i) * math.cos(2**i * x), range(depth)))

def draw(t, data, dim):
scale = min(dim) / 4
r = weierstrass_sin(t * weierstrass_cos(t))
x = int(scale * r * math.cos(t)) + (min(dim)//2)
y = int(scale * r * math.sin(t)) + (min(dim)//2)
#print(x, y)
data[x, y] = tuple(map(lambda p: int(p * 0.3), data[x, y]))


def main():
dim = (3240, 1080)
img = Image.new('RGB', dim, 'white')
pixels = img.load()
for i in np.linspace(0.0, 100.0, 1000000):
draw(i, pixels, dim)
img.show()
img.save('save.png')

main()

0 comments on commit 1560fe0

Please sign in to comment.