Gradient Triangles

This program uses vector mathematics and colors to create triangular gradient. By simply left-clicking you create three points which then will be filled in with color.

Controls

  • Left click adds a new position
  • Space saves a screenshot

A nearly filled canvas Scattered triangles Colors like autumn


# Python 2.7.7 Code
# Pygame 1.9.1 (for Python 2.7.7)
# Jonathan Frech  6th of October, 2015
#         edited  9th of October, 2015
#         edited 10th of October, 2015

Continue reading

Trippy

Using the extended pygame graphics function pygame.gfxdraw, this program creates randomly colored trippy circles. There are 100 circles, which get redrawn every 100 ticks (~ 1.6 seconds).
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 August, 2015

Continue reading

Pattern

Using colors and entities, this program can generate some nice-looking pictures. The entities move randomly across the screen, always staying in a grid layout. Their color is defined by an increasing tick variable, which gives them a nice gradient.

Controls

  • Space spawns in new entities
  • ‘m’ pauses and resumes the movement of entities

Only a few entites Diamond shape Really messy


# Python 2.7.7 Code
# Pygame 1.9.1 (for Python 2.7.7)
# Jonathan Frech 21st of May, 2015
#         edited 28th of July, 2015 
#          * commenting
#          * moving entity.tick() into render()
#          * removing unnecessary functions
#         edited 29th of July, 2015
#          * commenting
#          * improvement of code

Continue reading