Stars and Stripes

Stars and Stripes

A variation on the Stars and Stripes American Flag for Independence Day. It’s an exercise in the use of transparency in Pygame. The stripes are made transparent so the stars image behind shows through.…

Random Walk

Random Walk

A colourful random walk. The basic idea is very simple: choose a random heading in the range 0:360 degrees. Step in that direction. Choose another random heading & step again. Do this 2,000 times. As a bonus, we go through …

Square Spiral

Square Spiral

This is a very simple introduction to Turtle graphics. The turtle starts in the middle of the window, moves forward a small distance, turns right, moves forward a slightly longer distance, right again, even further this time… until the distance …

Black & White Harmonographs

Black & White Harmonographs

Black & White Harmonographs. Because colour gets boring after a while…

Harmonographs are those devices often seen in science museums, that consist of a pen connected to a number of pendulums, suspended over a sheet of paper on a board, …

Online 3D Harmonograph

Online 3D Harmonograph

Online 3D Harmonograph

This is an online 3d harmonograph version of those harmonograph devices often seen in science museums – except that instead of drawing pretty harmonic patterns on paper, here we plot them in 3D-space! Glowscript code and my …