Created
December 3, 2024 13:28
-
-
Save leonllrmc/2509f89348f51fbd52ea902afcb4a98b to your computer and use it in GitHub Desktop.
Nice image 1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data:image/png;charset=utf-8;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAIAAAAiOjnJAAADNklEQVR4Ae3Y0U7DMAwF0A7x/78MXo0sK2kjtjfI2cPkOk7RTq8C4zi8CBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQGAh8HW+amC4rL6CwAsCEaOYzvfcNndeuJ1RAj1MPVJdZp7pqzvXHzt/+MVnr8REUXXN9+a8WmMKArcCmZtKUi9u91g4DifWRQqGMF1MnC0hu5OJ/mOxtudSxOXxeLL0YqaYZ7IzT+7ZEazxuedxVbnpy9HM1Wr2McEqlig++4U6BN7IxxtbUG8qECdTHU5VlEV1nkPnP7pqSZECfhWukjCEJk6mubPav/Gab4Xjw38eQS8eQm9sGX/qv7sWrItHmn8zRVyiyDqHeuByKTt95uJ2W7YEa3zskZIKUBTxqtz0IpcqcLU03m7Xa98KL558piTfI0AXE2erwlTF3aQ+gR+BOpCqiIUKWTWrAEfgtwIVo9rwm04NKwisBDJMPVJzZ7XfGoE7gUhShikHhsu7XfoECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIE/oTAN99X73oPVuPzAAAAAElFTkSuQmCC |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PIL import Image, ImageDraw | |
import math | |
# Create a new image with RGB mode | |
image = Image.new("RGB", (200, 200), "black") | |
width, height = image.size | |
for x in range(width): | |
for y in range(height): | |
r,g,b = image.getpixel((x,y)) | |
cx, cy = x - width/2, y - height/2 | |
if math.sqrt(cx**2+cy**2) < 10*math.sin(((math.sqrt(cx**2+cy**2))*2*3.14)%(0.5*3.14)): | |
image.putpixel((x, y), 0xFFFFFF) | |
image | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment