Fun with Unity and Guilloché Patterns

Gino Messmer
Dec 6, 2018 · 3 min read

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.

No money talk in here. We’ll be taking a look at the famous pattern behind the ‘100’ figures label

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.

Where do we start?

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.

Scripting

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.

medialesson

We help our customers design, architect, develop and operate modern, intelligent, beautiful and usable apps on any platform powered by the Cloud, IoT and AI.

Gino Messmer

Written by

Dev, CS Student @ DHBW Karlsruhe & medialesson GmbH

medialesson

We help our customers design, architect, develop and operate modern, intelligent, beautiful and usable apps on any platform powered by the Cloud, IoT and AI.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade