Spaces:
Sleeping
Sleeping
Update CodexQuantum3D_Engine.py
Browse files- CodexQuantum3D_Engine.py +13 -15
CodexQuantum3D_Engine.py
CHANGED
|
@@ -1,26 +1,24 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
import numpy as np
|
| 4 |
from PIL import Image, ImageDraw
|
| 5 |
|
| 6 |
-
def simulate_quantum_visual(width=512, height=512
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
Generates a symbolic field image so the Space boots cleanly.
|
| 10 |
-
"""
|
| 11 |
|
| 12 |
img = Image.new("RGB", (width, height), "black")
|
| 13 |
draw = ImageDraw.Draw(img)
|
| 14 |
|
| 15 |
cx, cy = width // 2, height // 2
|
| 16 |
|
| 17 |
-
for r in range(10, min(cx, cy),
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
|
|
|
| 24 |
)
|
|
|
|
| 25 |
|
| 26 |
return img
|
|
|
|
| 1 |
+
import math
|
|
|
|
|
|
|
| 2 |
from PIL import Image, ImageDraw
|
| 3 |
|
| 4 |
+
def simulate_quantum_visual(seed, width=512, height=512):
|
| 5 |
+
# Convert any input into a deterministic numeric phase
|
| 6 |
+
phase = sum(ord(c) for c in str(seed)) % 360
|
|
|
|
|
|
|
| 7 |
|
| 8 |
img = Image.new("RGB", (width, height), "black")
|
| 9 |
draw = ImageDraw.Draw(img)
|
| 10 |
|
| 11 |
cx, cy = width // 2, height // 2
|
| 12 |
|
| 13 |
+
for r in range(10, min(cx, cy), 8):
|
| 14 |
+
theta = math.radians((r + phase) % 360)
|
| 15 |
+
x = int(cx + r * math.cos(theta))
|
| 16 |
+
y = int(cy + r * math.sin(theta))
|
| 17 |
+
color = (
|
| 18 |
+
(r * 3 + phase) % 255,
|
| 19 |
+
(r * 7) % 255,
|
| 20 |
+
(r * 11) % 255
|
| 21 |
)
|
| 22 |
+
draw.ellipse((x-2, y-2, x+2, y+2), fill=color)
|
| 23 |
|
| 24 |
return img
|