Be more animated online with your own animated Voronoi gif

If you’re active on social media, sometimes it can be difficult to stand out. With your audience scrolling quickly through their Twitter timeline or Facebook feed, your new EP announcement might get lost.

Perhaps that’s what has triggered the, let’s be honest, massive resurgence in the animated gif. A bit of movement in a post can draw the eye, possibly buying you an extra second or two of exposure, which might be all you need to get your message across.

If you follow us on Twitter, you may have seen this iconic headstock design crop up in your timeline:

Animated Strat Gif

Make your own animated Voronoi diagram gif

But how to do it? Well, once more we turn to our trusty copy of R Studio, which you may remember from blogland’s famous Christmas Song Sentiment Analysis post.

While I may use R mostly for crunching numbers, I’m always interested in finding out what else it can do, thanks to the many add-on packages that are written and made available. While rummaging through the R-related blogs, I chanced across Frokonstin’s blog Experiments in R. After my curiosity was piqued by the post about making art in R using no more characters of code than would fit in a tweet, I kept reading and found my way to an article describing how to make animated Voronoi diagrams.

Named after Georgy Voronoy, a Russian and Ukrainian mathematician of the late 19th century, a Voronoi diagram splits an area into pieces based on it’s location to a specific point. For example, you could take a map of the UK, put a dot where each airport is, and divide the country up into regions based on the nearest airport. There are some great Voronoi maps on Pinterest should you have a few minutes…

Anyway, if you fancy taking an image of your band, logo, or anything else you like really, and turning it into your own animated Voronoi gif, just follow the code in the blog post with your own image and you’re good to go! Well, almost…

In the blog post code, if you look at line 59, you’ll see

i=5000

This section of code (line 59 – 63) is used to produce the series of images that will form your gif. In order to produce the series, you’ll have to change the value of i and rerun the code each time. I used i from 500 – 5000 with increments of 500. Programmers amongst you may well be asking “why not just do it as a for loop?” I tried that, and I didn’t get a complete set of images, so manual iterations it was…

Enjoy! And a massive thanks to Fronkonstin for his blog post, and all his work actually, I have learnt a lot.

 

The following two tabs change content below.

Fynn Callum

producer, guitarist, engineer & dj
From indie guitarist to deep house producer via Northern Soul dj; mix engineer, producer and gear enthusiast. Jaffa Cake aficionado.

Join the discussion! What do you think?