https://stamm-wilbrandt.de/en/twitter/maxplana.pdf

Here is embedding and (straight line) drawing diagram from page 12:

Every planar graph has a straight line drawing like the one shown (graph edges are straight lines between the vertices).

I installed boost graph library:

Code: Select all

`sudo apt install libboost-graph-dev libboost-doc`

https://www.boost.org/doc/libs/1_74_0/l ... ersFormula

I did copy examples directory under $HOME:

Code: Select all

```
mkdir ~/boost
cp -r /usr/share/doc/libboost1.74-doc/examples/libs/graph/example ~/boost
```

Straight line drawing example does what I am interested in:

Code: Select all

```
pi@pi400-64:~/boost/example $ rm a.out
pi@pi400-64:~/boost/example $ g++ straight_line_drawing.cpp
pi@pi400-64:~/boost/example $ ./a.out
The straight line drawing is:
0 -> (0, 0)
1 -> (10, 0)
2 -> (5, 4)
3 -> (5, 5)
4 -> (2, 1)
5 -> (3, 2)
6 -> (4, 3)
Is a plane drawing.
pi@pi400-64:~/boost/example $
```

Code: Select all

```
// Create the graph - a maximal planar graph on 7 vertices. The functions
// planar_canonical_ordering and chrobak_payne_straight_line_drawing both
// require a maximal planar graph. If you start with a graph that isn't
// maximal planar (or you're not sure), you can use the functions
// make_connected, make_biconnected_planar, and make_maximal planar in
// sequence to add a set of edges to any undirected planar graph to make it maximal planar.
graph g(7);
add_edge(0, 1, g);
add_edge(1, 2, g);
add_edge(2, 3, g);
add_edge(3, 0, g);
```

Code: Select all

```
add_edge(3, 4, g);
add_edge(4, 5, g);
add_edge(5, 6, g);
add_edge(6, 3, g);
add_edge(0, 4, g);
add_edge(1, 3, g);
add_edge(3, 5, g);
add_edge(2, 6, g);
add_edge(1, 4, g);
add_edge(1, 5, g);
add_edge(1, 6, g);
```

OK, that was planar graphs and boost library.

Combinatorial object server allows to generate fullerenes:

http://www.combos.org/fullgen

Generate different types of fullerenes. A fullerene is a plane graph whose faces are all pentagons and hexagons. This is a website interface to the program fullgen, written by Gunnar Brinkmann. The default graph format are adjacency lists, where the neighbors of each vertex are listed in clockwise (cw) order around the vertex in the embedding of the graph.

fulgen.c can be downloaded and build with just "make":

http://users.cecs.anu.edu.au/~bdm/plantri/

Code: Select all

```
pi@pi400-64:~/plantri52 $ ./fullgen 60 ipr code 6 stdout
Time for generating the patches: 0.0 seconds
>>writegraph3d planar <<
1 0 0 0 18 19 2
2 0 0 0 1 3 40
3 0 0 0 2 32 4
4 0 0 0 3 5 41
5 0 0 0 4 30 6
6 0 0 0 5 7 43
7 0 0 0 6 29 8
8 0 0 0 7 9 45
9 0 0 0 8 27 10
10 0 0 0 9 11 46
11 0 0 0 10 25 12
12 0 0 0 11 13 48
13 0 0 0 12 24 14
14 0 0 0 13 15 50
15 0 0 0 14 22 16
16 0 0 0 15 17 51
17 0 0 0 16 20 18
18 0 0 0 17 1 53
19 0 0 0 1 20 33
20 0 0 0 19 17 21
21 0 0 0 20 22 35
22 0 0 0 21 15 23
23 0 0 0 22 24 36
24 0 0 0 23 13 25
25 0 0 0 24 11 26
26 0 0 0 25 27 37
27 0 0 0 26 9 28
28 0 0 0 27 29 38
29 0 0 0 28 7 30
30 0 0 0 29 5 31
31 0 0 0 30 32 39
32 0 0 0 31 3 33
33 0 0 0 32 19 34
34 0 0 0 33 35 39
35 0 0 0 34 21 36
36 0 0 0 35 23 37
37 0 0 0 36 26 38
38 0 0 0 37 28 39
39 0 0 0 38 31 34
40 0 0 0 2 41 54
41 0 0 0 40 4 42
42 0 0 0 41 43 56
43 0 0 0 42 6 44
44 0 0 0 43 45 57
45 0 0 0 44 8 46
46 0 0 0 45 10 47
47 0 0 0 46 48 58
48 0 0 0 47 12 49
49 0 0 0 48 50 59
50 0 0 0 49 14 51
51 0 0 0 50 16 52
52 0 0 0 51 53 60
53 0 0 0 52 18 54
54 0 0 0 53 40 55
55 0 0 0 54 56 60
56 0 0 0 55 42 57
57 0 0 0 56 44 58
58 0 0 0 57 47 59
59 0 0 0 58 49 60
60 0 0 0 59 52 55
0
Time for case 1 (Jordan-Curve Petrie Path): 0.0 seconds
Time for case 2 (Dumb-bell): 0.0 seconds
Time for case 3 (Sandwich): 0.0 seconds
MAPLIST: number of patches: 1783
BBLIST: number of items in list: 105 number of patches: 1122
Generated 1 maps on 60 vertices -- reduced to 1 non-isomorphic maps.
Total generation time: 0.0 seconds
end of program
pi@pi400-64:~/plantri52 $
```

This is drawing with corresponding clockwise planar embedding from website:

fulgen.c creates embeddings of fullerenes, so only "chrobak_payne_straight_line_drawing()" is needed to determine integer coordinates.

Todos:

- glue code for "chrobak_payne_straight_line_drawing()" and fulgen.c
- 2D graphic output (PostScript, X11, HTML, ...)
- determine 3D coordinates on unit sphere by eg. polar projection from planar drawing
- transform 3D coordinates to equal length edges
- display 3D somehow, ideally with 3D rotation capability