My dad's project!

Vyrona's weather station, Location: Athens, GREECE

Please wait. The image will appear soon on your screen

On the left, you can see Lycabbetus hill and in the middle, when the atmosphere is clear, mount Parnitha is visible

click on the image to see the weather station's page

Wednesday, November 7, 2012

Breaking the 3-Colours Granny Square Code.....

Hi to everyone! Has anyone missed me??
The past few months I have disappeared from the blogland because, I have a very heavy schedule  working on my undergraduate project in photonic crystals! 
The today post is about a program that me and A made, for computing the different colour arrangements of granny squares!
And how this idea came to our minds? Well, yesterday, Robin from Crochet Nirvana,  asked me:

''I have 14 colors of thread and I'm making 3 color granny squares.
How many color combinations are there (including various order combos ie: (red, blue, green), (blue, green, red), (green, blue, red) etc...)

And then thought, why not making a program that not only computes that number, but also  writes down all these different combinations? Of course the program will work with  any desired number for the colours of thread! So, we immediatelly started cooperating and made a  Fortran program which can be found in the following adress:

 Now a few instuctions:
Once you click on the above address, a new blank tab opens and the following message appears on your screen:
Unfortunately, it's written in greek but it's easy to see that the second option 'Save File' is checked. Once you save the file on  your computer,  unzip the folder Granny_Squares. In this folder, there's a .exe file which is the program we made. Double click on it and the following command line appears:

Now let's say you have 5 colours of thread, you write 5 and then press enter.

 The number of different arrangements appears on the screen and the GRANNY_SQUARES.TXT file is created in the GRANNY_SQUARES folder. This txt file can be opened with any editor and looks like this:

 The 60 arrangements are printed in the txt file (In this tutorial I show you only the first 23)

 You can give any number of colours, you want, then run the program and see how many different granny squares you can make! Have fun!!!

***The new updated ver2.0,  includes the combos for a 3, 4 and a 5 square. You can check it out  here****

Please, leave me a message, telling me how you found the program, in which crochet project it helped you, or report me any bugs!


  1. Oh my goodness!!
    You are a WONDER WOMAN!

    I knew that your scientific brain would be able to calculate the possibilities for me, but I had no idea that you would write a program for it!

    You are a gem and I am overwhelmed by your generous donation of your time and skills. I tried to do the calculations manually but quickly gave up.

    Thank you so much for this. I'm sure that lots of other crafters will find it useful!!

    Good luck with your studies!
    Be well,

  2. Χρόνια σου πολλά Αγγελική, ότι επιθυμείς εύχομαι! φιλάκια!

    1. Eυχαριστώ πολύ Έυη μου!!!! Και σε σέν ατα καλύτερα εύχομαι!! :-)

  3. Will this program work on a Mac? If so, could you please give instructions on how to download and use?
    It would be a very handy tool to have!

    1. I don't have a Mac computer and I think that .exe files don't run on Mac environment. But you can search on the internet 1. how to unrar files on mac and 2. how to run .exe files!
      The .txt file can be opened with any editor.

      Please let me know if you give it a try!!

  4. Would it be difficult to tweak the program to enter the number of colors in your square so if you were making a 5 color square with 12 color choices for example?

    1. I am intending to make a version 2 of this program, including the 4 and the 5 color square! Stay tuned!!


Thank you for taking the time to leave a comment! Your opinion is always welcome!

Related Posts Plugin for WordPress, Blogger...