Rotating 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

The first example The second example The third example


# Python 2.7.7 Code
# Pygame 1.9.1 (for Python 2.7.7)
# Jonathan Frech 27th of November, 2015
#         edited  2nd of January , 2016

Continue reading

Spinning Shapes

Drawing lines according to length and angle, which change over time, this program creates pretty shapes. The changing values for both length and angle are saved in the image’s name.

Inwards star Spinning square Doubled Origin logo


# Python 2.7.7 Code
# Pygame 1.9.1 (for Python 2.7.7)
# Jonathan Frech  4th of December, 2015
#         edited  6th of December, 2015
#         edited 25th of December, 2015

Continue reading