You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have figured out the core logic to produce any configuration of the illusion by altering the radius and spacing (from the edge of the image). The image in the description was generated using the following code.
from PIL import Image, ImageDraw
# Set the dimensions and background color
width, height = 500, 500
image = Image.new("RGB", (width, height), "gray")
draw = ImageDraw.Draw(image)
# Define circle radius and grid spacing
radius = 90
spacing = radius+20
# Define the centers of the circles
circle_centers = [
(spacing, spacing),
(width - spacing, spacing),
(spacing, height - spacing),
(width - spacing, height - spacing)
]
# Draw the circles
for center in circle_centers:
draw.ellipse((center[0] - radius, center[1] - radius, center[0] + radius, center[1] + radius), "white")
# Draw the square
square_size = width - 2*spacing
draw.rectangle((spacing,spacing,spacing+square_size,spacing+square_size), "gray")
I need some help with understanding how to break this down like the other illusions that have already been implemented.
Some general questions:
What would the illusion strength and difficulty parameters be in this illusion?
What parameters would go into the corresponding _paramters.py file?
For the illusions that have been implemented in the library, I see 5 files. For an initial commit, which ones should I work on?
Followup to Q3, how to approach adding a new illusion as a beginner (first file to create, writing the parameter dictionary, etc.)
How to verify whether the illusion is generated correctly before creating the PR?
The text was updated successfully, but these errors were encountered:
ujdcodr
changed the title
Kanizsa Square
New Illusion: Kanizsa Square
May 22, 2024
@DominiqueMakowski This is an interesting library and figuring out how to implement this illusion was an enjoyable challenge. I would like to add support for this and other illusions mentioned in the TODO items list. I would appreciate your support.
Describe the solution you'd like
![Screenshot from 2024-05-21 20-18-18](https://private-user-images.githubusercontent.com/22253110/332642728-dd682982-cbf0-46f8-8522-5d98ecb993f6.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA0NjgxNTQsIm5iZiI6MTcyMDQ2Nzg1NCwicGF0aCI6Ii8yMjI1MzExMC8zMzI2NDI3MjgtZGQ2ODI5ODItY2JmMC00NmY4LTg1MjItNWQ5OGVjYjk5M2Y2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzA4VDE5NDQxNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWI2NjkxNGRiZDBmM2M3M2ViOTUwNjAwYjQ5MThjODQzNjJkMWExNzNiZTE4YTFhZmMzMjI1YWNjNjA5MWNhNWYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.c-ZVjtfGAa0zvr31HrhmdhXUFnvqPLhn4avBz4uixuc)
How could we do it?
I have figured out the core logic to produce any configuration of the illusion by altering the radius and spacing (from the edge of the image). The image in the description was generated using the following code.
I need some help with understanding how to break this down like the other illusions that have already been implemented.
Some general questions:
The text was updated successfully, but these errors were encountered: