I was looking for fancy stock images based on the Guilloché pattern for one of my front end projects — You know, these fancy patterns that are being used for various banknotes as additional security feature to prevent tampering.
However, I haven’t found any free ones and I couldn’t be bothered to create one in Illustrator or in any other vector graphics editor because I lack experience in these.
So I went ahead and decided to boot up Unity3D again after a long while and have some fun in 2D.
First of all, some back story behind the Guilloché pattern. Many people are familiar with this pattern that looks more or less like this:
Most people associate it with decoration or with money. This pattern dates back to the 1700’s when people have started to use this pattern for furniture and luxury goods like watches.
It took off and is also being used as seal for an additional layer of security for various commercial products and objects such as banknotes.
Let’s have a look at some quick maths:
This formula allows you to calculate a given point of the pattern. Changing one of the variables completely changes the result which makes the Guilloché pattern secure and battle-tested.
That’s everything we actually need to know. Time to create a new Unity project. I’ve used the default 2D template for minimal setup.
Using the formula above, we can create a new method that allows us to calculate the vector of one particular point:
Having this set up, we can initiate this method from our start up method:
Let’s have a quick look:
Looks fancy, doesn’t it? Let’s drop another prefab with different options.
Now let’s add a line renderer that connects each point for some extra curvature:
Let’s make some actual adjustments and spice up the whole scene with some post processing effects — just because we can:
We can do more crazy stuff but I’ll leave it up to you. Check out my GitHub repository and feel free to share your take. Looks like math can be actually beautiful and fun sometimes.