💤 :
import math
import pygame
pygame.init()
WIDTH, HEIGHT = 800, 800
screen = pygame.display.set_mode((WIDTH, HEIGHT))
pygame.display.set_caption("Electric Plasma Ring")
clock = pygame.time.Clock()
cx, cy = WIDTH // 2, HEIGHT // 2
angle = 0
running = True
while running:
clock.tick(60)
for event in pygame.event.get():
if event.type == pygame.QUIT:
running = False
screen.fill((0, 0, 0))
angle += 0.02
# Outer plasma ring
for i in range(180):
a = math.radians(i * 2) + angle
r = 170 + 12 * math.sin(i * 0.3 + angle * 6)
x = cx + math.cos(a) * r
y = cy + math.sin(a) * r
color = (
0,
180 + int(75 * math.sin(i * 0.2 + angle * 3)),
255,
)
pygame.draw.circle(screen, color, (int(x), int(y)), 4)
# Inner electric beams
for i in range(40):
a = i * 0.6 + angle * 4
r1 = 120 + 25 * math.sin(angle * 5 + i)
r2 = 175 + 20 * math.cos(angle * 4 + i)
x1 = cx + math.cos(a) * r1
y1 = cy + math.sin(a) * r1
x2 = cx + math.cos(a + 0.25) * r2
y2 = cy + math.sin(a + 0.25) * r2
pygame.draw.line(
screen,
(100, 255, 255),
(int(x1), int(y1)),
(int(x2), int(y2)),
2,
)
# Pulsing core
pulse = 55 + 8 * math.sin(angle * 6)
pygame.draw.circle(
screen,
(0, 255, 255),
(cx, cy),
int(pulse),
)
pygame.draw.circle(
screen,
(255, 255, 255),
(cx, cy),
int(pulse / 2),
)
# Orbiting nodes
for i in range(12):
a = angle * 2 + i * (math.pi / 6)
x = cx + math.cos(a) * 230
y = cy + math.sin(a) * 230
pygame.draw.circle(
screen,
(0, 255, 180),
(int(x), int(y)),
5,
)
pygame.display.flip()
pygame.quit()
2026-08-27 13:25:38