2

Here is my problem: I have a graph structure (with straight line edges) which I know to be planar (i.e. there exists an embedding of the graph where no edges cross). I need an algorithm which will take my graph and produce a straight line planar embedding of it. The algorithm does not need to be too efficient (an O(N^2) algorithm would do fine). Any ideas/suggestions?

Tomas
  • 57,621
  • 49
  • 238
  • 373
Mustafa
  • 21
  • 1

2 Answers2

1

you may want at graphviz ( http://www.graphviz.org/ ). This will be able to draw it in many different formats and a pretty simple input definition. Several algorithms can be used to create graphs.

otherwise, scheck out Boyer-Myrvold planarity algorithm and assorted c code from wikipedia: http://jgaa.info/accepted/2004/BoyerMyrvold2004.8.3/planarity.zip

user542164
  • 96
  • 1
1

Read this document...

I had this project for my Algorithms course, to embed the graph we used SVG format... once u decide the algorithm, SVG format is easy to generate...

Dan D.
  • 73,243
  • 15
  • 104
  • 123
Eternal Noob
  • 2,717
  • 5
  • 27
  • 41