Back to Project List


A puzzle: Arrange the given graph such that the edges intersect only at the vertices

Respository Video ▶️


Planarity is a puzzle based on the concept of Planar Graphs.


Live at:



A planar graph is a graph that can be drawn on a 2D plane such that the edges intersect only at the vertices. The goal of the puzzle is to untangle the graph to reveal its planar nature.

Generating puzzle piece

The game uses John Tantalo's algorithm to generate planar graphs.

  1. Generate a set of random lines in a plane such that no two lines are parallel

geogebra 1

  1. Calculate the intersections of each pair of lines

geogebra 2

  1. Mark the intersection points as vertices and segments as edges of the graph

geogebra 3

geogebra 4

The vertices of the graph are then randomly shuffled maintaining the topology to get the final puzzle piece


  1. Player will be presented with a planer tangled graph at level 4 at the beginning
  2. Move the nodes with a pointing device to untangle the graph and reach the next level




This project is free and open-source under the GPL-3.0 License.

Asmita Hase

Now with coloured edges!


November 14, 2021

Barely works!


Live at:

November 14, 2021

Project created by Asmita Hase

October 28, 2021