Why it worked
The video combines aesthetic, high-quality generative art with the technical 'behind-the-scenes' code, appealing to both programmers and general viewers who enjoy satisfying visual content.
Summary
A screen recording shows Python code using the Pygame library to generate an animated, rotating 3D heart shape made of particles. The video focuses on the programming logic and the resulting visual effect.
On-screen text
import pygame as np
import random
pygame.init()
WIDTH, HEIGHT = 1200, 800
SCREEN = pygame.display.set_mode((WIDTH, HEIGHT))
pygame.display.set_caption("心形")
BLACK = (0, 0, 0)
WHITE = (255, 255, 255)
HEART_PINK = (255, 105, 180)
LIGHT_PINK = (255, 182, 193)
PURPLE = (128, 0, 128)
PALE_PURPLE = (216, 191, 216)
# ... (code continues)