Category: Python

  • Improving the Rainbow – Part 2

    Improving the Rainbow – Part 2

    In the previous part of this tutorial, Improving the Rainbow – Part 1, we have seen different techniques to reproduce the colours of the rainbow procedurally. Solving this problem efficiently will allow us to simulate physically based reflections with a much higher fidelity. The purpose of this post is to introduce a novel approach that…

  • Positioning and Trilateration

    Positioning and Trilateration

    This post shows how it is possible to find the position of an object in space, using a technique called trilateration. The traditional approach to this problem relies on three measurements only. This tutorial addresses how to it is possible to take into account more measurements to improve the precision of the final result. This algorithm is…

  • Understanding Geographical Coordinates

    Understanding Geographical Coordinates

    This series introduces the concept of trilateration. This technique can be applied to a wide range of problems, from indoor localisation to earthquake detection. This first post provides a general introduction to the concept of geographical coordinates, and how they can be effectively manipulated. The second post in the series, Positioning and Trilateration, will cover the actual…

  • Generating Deep Dreams

    Generating Deep Dreams

    The previous post in this series, Understanding Deep Dreams, explained what deep dreams are, and what they can be used for. In this second post you’ll learn how to create them, with a step by step guide.

  • The Top 5 Easter Eggs in Python

    The Top 5 Easter Eggs in Python

    Despite being a very serious language, Python is full of Easter eggs and hidden references. This post shows the top 5: I have covered the 5 most interesting features of Python in this post.

  • The Top 5 Hidden Features of Python

    The Top 5 Hidden Features of Python

    Python aims to be an elegant and expressive language; this post includes its top 5 hidden features: The term hidden is loosely used to indicate features which are generally unique to Python, or not very well known. I covered the most interesting Easter eggs which are really hidden in Python in this post.

  • Game Barcode: A Study of Colours in Games

    Game Barcode: A Study of Colours in Games

    This tutorial shows how to download videos from YouTube and to process their frames with Python; I have used this technique to create game barcode, an image created by sorting the colours in each frame of a particular video. You can see some of most intriguing here: This tutorial is divided in four parts:

  • Interactive Graphs in the Browser

    Interactive Graphs in the Browser

    Having worked both as a teacher and an artist, I know how important data visualisation is. This tutorial will teach you to create interactive network graphs with Python and JavaScript. You can have a go by dragging the nodes of the graph below… You can find a high resolution version of the melancoil tree (2000x2000px, first 1000 numbers)…

  • Recreational Maths in Python

    Recreational Maths in Python

    This post is for all the developers and mathematicians out there that are curious to explore and visualize the bizarre properties of numbers. Although Maths plays an important role in today’s technology, many people likes to abuse it for recreational purposes. Part of the appeal of Recreational Maths lies in the challenge to discover something new. Despite what many believe, finding mathematical patterns is very easy; it’s…

  • The incredibly challenging task of sorting colours

    The incredibly challenging task of sorting colours

    Let’s start with something trivial: sorting numbers. Regardless of the algorithm you’ll use, real numbers are naturally ordered. Mathematically speaking, they have a total order, in the sense that you can always decide if a number is greater than another one. There is no ambiguity in this, meaning you can actually sort them, and (excluding duplicates) this sort is unique. There are other fields…