Other Stuff‎ > ‎

Bead Pattern Generator

My kids went through a phase of playing with Hama beads and I helped my son to build some designs that came with the beads.  
We did one pattern for a Ben10 alien and when it was done it looked just like a sprite from an old computer game.  This got me thinking about creating my own bead pattern generator from images.

The concept is really quite simple.  To take a colour image,  to break it down into pixels,  to work out what bead is the closest colour match to the pixel colour (from a given brand of beads) and to print the final design.

I found some useful colour reference charts online and from these I made a spreadsheet of all the available beads and their colours (as RGB value).  This data will be used by my pattern generator program.

Colour reference table

I wrote some Python code to take a small image, like this Pikachu,and generate a bead pattern.  I added some options to set background colour and to select the brand of beads that you have (from Hama, Perler, Nabbi or PictureBeads).
The result is output as a PDF document for easy printing.

This seemed to be working well so I thought I would give the program a proper test and generate a bigger pattern (spanning many large boards).  I generated a bead pattern from this image..
It came out on many pages,  like this...

It took about a week with help from the kids to construct this design and we needed a ton of beads. I mounted it on my wall.

I took the Ultimate logo from a screenshot of AticAtac on the ZX Spectrum.  One day it would be cool to do the whole thing!

I did start on a GUI for the bead generator program (about 6 months ago) but don't have the motivation to go back and finish it - too much other interesting stuff to do!  and kids don't play with beads anymore.

I attached the unfinished source.

Jon Wilson,
29 May 2012 16:42