Planar graph embedding algorithm