Unity Engine / C#
One day, a friend of mine was trying to draw a specific figure without lifting the pencil and challenged me to find the solution.
I chose not to solve this puzzle with maths or logic, but instead created a script that would simply try every single possibilities until it found a solution.
This is the reason behind this very small project and I had a lot of fun making it.
The original script tested all possibilities almost instantly, but this version tries one path per frame : it makes easier to see how it works.
There is actually no way to draw this figure without lifting the pencil.
In a mathematical point of view , we are looking for a eulerian or semi-eulerian path. This implies that we need all vertices to be connected to an even number of edges, or exactly two vertices connected to an odd number of edges.
More info about Eulerian paths here.