122 lines
4.6 KiB
Python
122 lines
4.6 KiB
Python
import math
|
|
import numpy as np
|
|
from PIL import Image, ImageDraw, ImageFilter
|
|
|
|
SIZE = 1024
|
|
CENTER = SIZE / 2.0
|
|
|
|
# 1. Base image: deep seamless cosmic background
|
|
bg = Image.new('RGBA', (SIZE, SIZE), (5, 8, 22, 255))
|
|
# Create stars
|
|
np.random.seed(42)
|
|
bg_draw = ImageDraw.Draw(bg)
|
|
for _ in range(350):
|
|
sx = np.random.randint(0, SIZE)
|
|
sy = np.random.randint(0, SIZE)
|
|
br = np.random.randint(120, 255)
|
|
sz = np.random.choice([1, 1, 2, 2, 3], p=[0.6, 0.25, 0.1, 0.04, 0.01])
|
|
bg_draw.ellipse([sx, sy, sx+sz, sy+sz], fill=(br, br, 255, br))
|
|
|
|
# Add soft nebula
|
|
neb = Image.new('RGBA', (SIZE, SIZE), (0, 0, 0, 0))
|
|
ndraw = ImageDraw.Draw(neb)
|
|
ndraw.ellipse([200, 150, 850, 800], fill=(20, 50, 110, 80))
|
|
ndraw.ellipse([300, 300, 750, 750], fill=(80, 30, 120, 60))
|
|
neb = neb.filter(ImageFilter.GaussianBlur(100))
|
|
bg = Image.alpha_composite(bg, neb)
|
|
|
|
# 2. STRICT 13-POINTED STAR GEOMETRY
|
|
N_POINTS = 13
|
|
R_TIP = SIZE * 0.46
|
|
R_VALLEY = SIZE * 0.29
|
|
R_RIM = SIZE * 0.27
|
|
R_CORE = SIZE * 0.095
|
|
|
|
star_points = []
|
|
start_angle = -math.pi / 2.0 # Point #1 straight up
|
|
|
|
for i in range(N_POINTS * 2):
|
|
ang = start_angle + i * math.pi / N_POINTS
|
|
r = R_TIP if (i % 2 == 0) else R_VALLEY
|
|
star_points.append((CENTER + r * math.cos(ang), CENTER + r * math.sin(ang)))
|
|
|
|
star_layer = Image.new('RGBA', (SIZE, SIZE), (0, 0, 0, 0))
|
|
sdraw = ImageDraw.Draw(star_layer)
|
|
|
|
# Draw 13 luminous 3D crystalline rays with electric cyan/platinum gradient
|
|
for i in range(N_POINTS):
|
|
p_tip = star_points[i * 2]
|
|
p_left = star_points[(i * 2 - 1) % (N_POINTS * 2)]
|
|
p_right = star_points[(i * 2 + 1) % (N_POINTS * 2)]
|
|
|
|
# Left facet (darker cyan)
|
|
sdraw.polygon([CENTER, CENTER, p_left[0], p_left[1], p_tip[0], p_tip[1]], fill=(30, 110, 190, 220))
|
|
# Right facet (brighter electric white-cyan)
|
|
sdraw.polygon([CENTER, CENTER, p_tip[0], p_tip[1], p_right[0], p_right[1]], fill=(140, 225, 255, 240))
|
|
# Ridge highlight line
|
|
sdraw.line([CENTER, CENTER, p_tip[0], p_tip[1]], fill=(255, 255, 255, 255), width=3)
|
|
# Outer edge strokes
|
|
sdraw.line([p_left[0], p_left[1], p_tip[0], p_tip[1]], fill=(200, 245, 255, 220), width=2)
|
|
sdraw.line([p_tip[0], p_tip[1], p_right[0], p_right[1]], fill=(200, 245, 255, 220), width=2)
|
|
|
|
# 3. Inner Circular Medallion (Obsidian space mirror)
|
|
med_layer = Image.new('RGBA', (SIZE, SIZE), (0, 0, 0, 0))
|
|
mdraw = ImageDraw.Draw(med_layer)
|
|
|
|
# Deep dark glass base
|
|
mdraw.ellipse([CENTER - R_RIM, CENTER - R_RIM, CENTER + R_RIM, CENTER + R_RIM], fill=(8, 12, 28, 250), outline=(130, 235, 255, 255), width=6)
|
|
mdraw.ellipse([CENTER - R_RIM + 6, CENTER - R_RIM + 6, CENTER + R_RIM - 6, CENTER + R_RIM - 6], outline=(50, 140, 230, 160), width=2)
|
|
|
|
# 4. CHROME-STYLE TRISKELION IN THE CENTER
|
|
# Exactly ONE central circle
|
|
mdraw.ellipse([CENTER - R_CORE, CENTER - R_CORE, CENTER + R_CORE, CENTER + R_CORE], fill=(4, 7, 20, 255), outline=(255, 255, 255, 255), width=6)
|
|
mdraw.ellipse([CENTER - R_CORE + 4, CENTER - R_CORE + 4, CENTER + R_CORE - 4, CENTER + R_CORE - 4], outline=(70, 210, 255, 200), width=3)
|
|
|
|
# 3 Chrome pinwheel curved blades
|
|
for k in range(3):
|
|
rot = start_angle + k * (2.0 * math.pi / 3.0)
|
|
|
|
# Generate curved blade polygon (like Chrome segment)
|
|
blade_outer = []
|
|
blade_inner = []
|
|
|
|
steps = 40
|
|
for s in range(steps + 1):
|
|
t = s / float(steps)
|
|
# Radius grows from core to rim
|
|
cr = R_CORE + t * (R_RIM - R_CORE - 12)
|
|
# Angle swirls by ~75 degrees
|
|
ca = rot + t * 1.3
|
|
|
|
# Outer curve
|
|
bx = CENTER + cr * math.cos(ca)
|
|
by = CENTER + cr * math.sin(ca)
|
|
blade_outer.append((bx, by))
|
|
|
|
# Inner curve (slightly thinner)
|
|
thickness = (1.0 - t * 0.8) * 22
|
|
inner_r = max(R_CORE, cr - thickness)
|
|
ix = CENTER + inner_r * math.cos(ca + 0.1)
|
|
iy = CENTER + inner_r * math.sin(ca + 0.1)
|
|
blade_inner.append((ix, iy))
|
|
|
|
blade_poly = blade_outer + blade_inner[::-1]
|
|
|
|
# Draw glowing luminous blade
|
|
mdraw.polygon(blade_poly, fill=(50, 180, 255, 200))
|
|
# Bright leading spine
|
|
for p in range(len(blade_outer) - 1):
|
|
mdraw.line([blade_outer[p], blade_outer[p+1]], fill=(255, 255, 255, 255), width=3)
|
|
|
|
# Composite layers
|
|
comp = Image.alpha_composite(bg, star_layer)
|
|
comp = Image.alpha_composite(comp, med_layer)
|
|
|
|
# Add ethereal celestial glow (bloom)
|
|
bloom = comp.filter(ImageFilter.GaussianBlur(12))
|
|
final_img = Image.blend(comp, bloom, 0.25)
|
|
|
|
out_file = '/home/alexives/.gemini/antigravity-ide/brain/4ff924d9-3d7f-4202-9066-3ac5c3088b8e/star_exact_13_luminous_chrome.png'
|
|
final_img.save(out_file, 'PNG')
|
|
print("EXACT 13-POINTED STAR generated and verified at", out_file)
|