diff --git a/Astatin3-v4.png b/Astatin3-v4.png new file mode 100644 index 0000000..a6f514a Binary files /dev/null and b/Astatin3-v4.png differ diff --git a/diff.png b/diff.png new file mode 100644 index 0000000..20947f1 Binary files /dev/null and b/diff.png differ diff --git a/icon.png b/icon.png new file mode 100644 index 0000000..92774da Binary files /dev/null and b/icon.png differ diff --git a/main.py b/main.py new file mode 100644 index 0000000..b983b9b --- /dev/null +++ b/main.py @@ -0,0 +1,96 @@ +import drawsvg as draw +import math + +size = 8192 + +GREEN = '#00ff00' +BLACK = '#000000' +WHITE = '#ffffff' + +d = draw.Drawing(size*2, size*2, origin='center') + +d.append(draw.Rectangle(-size, -size, size*2 ,size*2, fill=BLACK)) + +def draw_oct(r:float, c): + r += r-r*math.sin(math.pi*0.625) + + lines = [] + for i in range(0,9): + lines.append(r*math.cos((math.pi/4)*i + math.pi/8)) + lines.append(r*math.sin((math.pi/4)*i + math.pi/8)) + + d.append(draw.Lines(0,0, *lines, + close=True, + fill=c)) + + +draw_oct(size*(211/256),GREEN) +draw_oct(size*(193/256),BLACK) + + +r1 = size*(14/256) +r2 = size*(80/128) +r3 = size*(88/128) +r4 = size*(2/256) + + +lines = [] + + +lines.append((r2+r4)*math.cos(-math.pi/2)) +lines.append((r2+r4)*math.sin(-math.pi/2)) + +lines.append((r3+r4)*math.cos(math.pi*(11/6))) +lines.append((r3+r4)*math.sin(math.pi*(11/6))) + +lines.append((r2+r4)*math.sin(math.pi*(2/6))) +lines.append((r2+r4)*math.cos(math.pi*(2/6))) + +lines.append((r3+r4)*math.cos(math.pi*(3/6))) +lines.append((r3+r4)*math.sin(math.pi*(3/6))) + +lines.append((r2+r4)*math.cos(math.pi*(5/6))) +lines.append((r2+r4)*math.sin(math.pi*(5/6))) + +lines.append((r3+r4)*math.cos(math.pi*(7/6))) +lines.append((r3+r4)*math.sin(math.pi*(7/6))) + + + +d.append(draw.Lines(lines[0],lines[1], *lines, +close=True, +fill=GREEN)) + +def draw_d(rot:float): + lines = [] + + lines.append(r1*math.cos(rot)) + lines.append(r1*math.sin(rot)) + + lines.append(r3*math.cos(rot + math.pi/3)) + lines.append(r3*math.sin(rot + math.pi/3)) + + lines.append(r2*math.cos(rot)) + lines.append(r2*math.sin(rot)) + + lines.append(r3*math.cos(rot - math.pi/3)) + lines.append(r3*math.sin(rot - math.pi/3)) + + d.append(draw.Lines(lines[0],lines[1], *lines, + close=True, + fill=BLACK)) + +draw_d(-math.pi/2) +draw_d(math.pi*(1/6)) +draw_d(math.pi*(5/6)) + +d.save_png('icon.png') + + + +# import cv2 + +# img1 = cv2.imread("example.png") +# img2 = cv2.imread("Astatin3-v4.png") + +# cv2.imwrite("diff.png", img1+img2) \ No newline at end of file diff --git a/requrements.txt b/requrements.txt new file mode 100644 index 0000000..e69de29