Tag: graphics

harmonograph
Posted in Harmonograph Pyplot

Multi-pendulum Harmonograph simulator using numpy and matplotlib

This is a simple harmonograph simulator to generate random-ish harmonographs. It asks for the number of pendulums, and exits if the number is 0. It also asks for the frequency spread, which means roughly, how far from integer may the …

Posted in Harmonograph Intermediate

Spectral Harmonographs

This Python + Pygame program draws the trace of 4 decaying sine waves, 2 per axis, with rainbow colours. It generates a sequence of random harmonographs.

A harmonograph is a mechanical device typically seen in science museums, that has two …

Harmonograph in Pygame
Posted in Harmonograph

Harmonograph in Pygame

You may have seen those devices at the Science Museum or Exploratorium or Techniquest… There’s a drawing surface and some arrangement of pendula with a pen touching the paper on the drawing surface, set in motion it draws these …

Posted in Basic

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.…

Posted in Beginner

Rainbow Flag in Pygame

This little Pygame program paints the Rainbow Flag, as used by the LGBT movement. It illustrates:

Posted in Advanced Fractals

Fast Mandelbrot Set by QuadTree

Most Mandelbrot Set programs proceed along the display area, pixel by pixel horizontally, row by row from top to bottom. This one doesn’t. It divides up the screen into 6 horizontal squares in 2 rows, then for each one, checks …

Harmonograph
Posted in Harmonograph Intermediate

Extensible Harmonograph

Often seen in science museums, the harmonograph is a device that combines wave motions (e.g. from some pendulums) to move a pen resting on a sheet of paper. These movements result in attractive patterns. This device can be simulated easily …

Posted in Basic Pyplot

Easy Graph Plotting with Pyplot

Graphs (also known as charts) are an indispensible visual aid for conveying a lot of data in an easy-to-digest form. Everyone is familiar with graphs in everyday life, such as those showing trends over time, e.g. world population, global …