Gradient Drawer

This is more of an artistic program. By left-clicking you set a fix point and define a random color. Where you then move your mouse, the program will draw 100 circles in between the fix point and the cursor position. By right-clicking you save those 100 circles on the canvas. Holding the right mouse button is possible.


  • Left clicking sets or removes a fix point
  • Right clicking saves current circles on canvas
  • ‘s’ saves current canvas
  • ‘c’ clears current canvas

The First Example The Second Example The Third Example The Fourth Example The Fifth Example

# Python 2.7.7 Code
# Pygame 1.9.1 (for Python 2.7.7)
# Jonathan Frech 4th of July, 2015

Continue reading


Inspired by a pattern on a storage box I own I decided to try program something simulating it. This program shows variously colored boxes with a black gap in between. You can adjust the box size, the gap size and even how many boxes will appear on the screen (all changeable in the code).
The pattern will be newly generated every half a second.
Boxes 2 Boxes 3 Boxes 10 Boxes 11 Boxes 6

# Python 2.7.7 Code
# Pygame 1.9.1 (for Python 2.7.7)
# Jonathan Frech 28th of May, 2015

Continue reading

Colors VI

This sixth version of my ‘Colors’ program has only a few improvements. At first it uses a different method to change the individual pixels. Instead of using ‘pygame.PixelArray()’ it calls on the surface ‘.set_at()’. Also you get an indicator if it has finished drawing (to be seen in the caption). At last it always – not needing a user input – saves the drawing if it is finished.
To get more information on my ‘Colors’ program, see ‘Colors V’.

Image 1 Image 2 Image 3

# Python 2.7.7 Code
# Pygame 1.9.1 (for Python 2.7.7)
# Jonathan Frech 23rd of March, 2015
#         edited  2nd of April, 2015
#         edited 20th of May  , 2015

Here goes the ‘getColor()’ function.
Continue reading