Spaces:
Sleeping
Sleeping
| import math | |
| from PIL import Image, ImageDraw | |
| def simulate_quantum_visual(seed, width=512, height=512): | |
| # Convert any input into a deterministic numeric phase | |
| phase = sum(ord(c) for c in str(seed)) % 360 | |
| img = Image.new("RGB", (width, height), "black") | |
| draw = ImageDraw.Draw(img) | |
| cx, cy = width // 2, height // 2 | |
| for r in range(10, min(cx, cy), 8): | |
| theta = math.radians((r + phase) % 360) | |
| x = int(cx + r * math.cos(theta)) | |
| y = int(cy + r * math.sin(theta)) | |
| color = ( | |
| (r * 3 + phase) % 255, | |
| (r * 7) % 255, | |
| (r * 11) % 255 | |
| ) | |
| draw.ellipse((x-2, y-2, x+2, y+2), fill=color) | |
| return img |