hp
toc

Rotating Squares

2016-01-03, post № 98

programming, Pygame, Python, #2015, #color, #colorful, #rotate, #rotating, #spin, #spinning, #square, #squares

Using the pygame.transform.rotozoom() function, a velocity argument and changing colors, this program rotates squares across the screen.

Controls

  • Left click spawns in a new square at current mouse position,
  • ‘Space’ takes a screenshot.
rotating-squares-2.png
rotating-squares-5.png
rotating-squares-9.png
Source code: rotating-squares.py
Jonathan Frech's blog; built 2024/08/31 22:59:44 CEST