commit 8d1df4187358f1a9a5ac0f755905da70897eadd9 Author: cynic Date: Fri Oct 7 11:02:05 2022 -0400 first commit diff --git a/bg.png b/bg.png new file mode 100644 index 0000000..79b60d5 Binary files /dev/null and b/bg.png differ diff --git a/daiba.jpg b/daiba.jpg new file mode 100644 index 0000000..0ee12dc Binary files /dev/null and b/daiba.jpg differ diff --git a/main.py b/main.py new file mode 100644 index 0000000..f258515 --- /dev/null +++ b/main.py @@ -0,0 +1,30 @@ +from PIL import Image +import numpy as np +from math import sin, cos +from math import radians + +def great_replacer(i, color = (255, 255, 255, 255)): + data = np.array(i) + data[(data == color).all(axis = -1)] = (0,0,0,0) + return Image.fromarray(data, mode='RGBA') + +single = great_replacer(Image.open("single.png").convert('RGBA')) +single = single.resize((int(single.width/2), int(single.height/2))) +zero = Image.open("zero.png").convert('RGBA') + +canvas = Image.new("RGBA", (zero.width*2, zero.height*2)) + +for deg in range(0, 360*2, 10): + r = 70 + (deg/4) + + modx = int(cos(radians(deg))*r) + mody = -1*int(sin(radians(deg))*r) + + print(modx, mody) + rsingle = single.rotate(270+deg) + + canvas.paste(rsingle, box=(118+modx+int(zero.width/2)-int(rsingle.width/2), 84+mody+int(zero.height/2)-int(rsingle.height/2)), mask=rsingle) + +canvas.paste(zero, (114, 104), mask=zero) + +canvas.show() \ No newline at end of file diff --git a/naiba.png b/naiba.png new file mode 100644 index 0000000..2dbc159 Binary files /dev/null and b/naiba.png differ diff --git a/single.png b/single.png new file mode 100644 index 0000000..e921fab Binary files /dev/null and b/single.png differ diff --git a/zero.png b/zero.png new file mode 100644 index 0000000..7269ef0 Binary files /dev/null and b/zero.png differ