Skip to content

Latest commit

 

History

History
45 lines (27 loc) · 2.01 KB

README.md

File metadata and controls

45 lines (27 loc) · 2.01 KB

Background

At one of these afternoons we were together with the family and someone had this children card game "Dobble". After playing it for a while there was the idea that it would be an amazing idea to have the game with personalized pictures as christmas present. So I went to the web and quickly found an related question on stackoverflow, with a nice python example implementation already on github.

Number of Images and Cards:

You can produce a deck of N cards with N images. N must be prime so there is an order O (also prime number) that satisfies: N = O² + O + 1. Eg if you want to have a deck with 30+ images you have to have 31 images and 5 images per card. 31 = 5² + 5 +1

How to run:

Place 31 images in "input_images"

Requirements:

You need the pillow package installed

pip install pillow

Than run:

python create_cards.py -d input_images_directory -o out_images_directory -O number_of_images_per_card

Make sure that the number of images per card matches: N = O² + O + 1 (O: number of images per card, N: number of cards). Otherwise you don't create a finite geometric plane.

You will get images like the examples in out_images like these:

Its tested with python 2.7 and order of 5 --> 31 cards. For other configs it might be neccessary to change the code in draw.py because it may create overlays etc. You will find the cards of the game in the out_images folder.

For those interested in the Geometry behind: https://de.wikipedia.org/wiki/Fano-Ebene

References: