Skip to content
Snippets Groups Projects
Commit aa7d41d1 authored by Francois Hamonic's avatar Francois Hamonic
Browse files

print

parent e3aeeda7
Branches
No related tags found
No related merge requests found
No preview for this file type
......@@ -9,8 +9,8 @@
1 2 0.0
2 0 0.0
0 3 3.0
0 3 1.0
1 3 1.0
1 4 1.0
2 4 2.0
2 4 1.0
3 4 1.0
\ No newline at end of file
12 25 5
0 0.0 1.0
1 0.951 0.309
2 0.587 -0.809
3 -0.587 -0.809
4 -0.951 0.309
0 2.1067999697460698 -2.899761388407705
1 -2.106799969746069 -2.899761388407706
2 -3.4088739585463905 1.1076102911071575
3 0 3.5843021946010944
4 3.4088739585463905 1.1076102911071581
0 1 0.0
1 2 0.0
......
%!PS-Adobe-2.0 EPSF-2.0
%%Creator: LEMON, graphToEps()
%%CreationDate: Sat Dec 14 16:35:21 2019
%%BoundingBox: -13 -13 213 213
%%EndComments
/lb { setlinewidth setrgbcolor newpath moveto
4 2 roll 1 index 1 index curveto stroke } bind def
/l { setlinewidth setrgbcolor newpath moveto lineto stroke } bind def
/c { newpath dup 3 index add 2 index moveto 0 360 arc closepath } bind def
/sq { newpath 2 index 1 index add 2 index 2 index add moveto
2 index 1 index sub 2 index 2 index add lineto
2 index 1 index sub 2 index 2 index sub lineto
2 index 1 index add 2 index 2 index sub lineto
closepath pop pop pop} bind def
/di { newpath 2 index 1 index add 2 index moveto
2 index 2 index 2 index add lineto
2 index 1 index sub 2 index lineto
2 index 2 index 2 index sub lineto
closepath pop pop pop} bind def
/nc { 0 0 0 setrgbcolor 5 index 5 index 5 index c fill
setrgbcolor 1.1 div c fill
} bind def
/nsq { 0 0 0 setrgbcolor 5 index 5 index 5 index sq fill
setrgbcolor 1.1 div sq fill
} bind def
/ndi { 0 0 0 setrgbcolor 5 index 5 index 5 index di fill
setrgbcolor 1.1 div di fill
} bind def
/nfemale { 0 0 0 setrgbcolor 3 index 0.0909091 1.5 mul mul setlinewidth
newpath 5 index 5 index moveto 5 index 5 index 5 index 3.01 mul sub
lineto 5 index 4 index .7 mul sub 5 index 5 index 2.2 mul sub moveto
5 index 4 index .7 mul add 5 index 5 index 2.2 mul sub lineto stroke
5 index 5 index 5 index c fill
setrgbcolor 1.1 div c fill
} bind def
/nmale {
0 0 0 setrgbcolor 3 index 0.0909091 1.5 mul mul setlinewidth
newpath 5 index 5 index moveto
5 index 4 index 1 mul 1.5 mul add
5 index 5 index 3 sqrt 1.5 mul mul add
1 index 1 index lineto
1 index 1 index 7 index sub moveto
1 index 1 index lineto
exch 5 index 3 sqrt .5 mul mul sub exch 5 index .5 mul sub lineto
stroke
5 index 5 index 5 index c fill
setrgbcolor 1.1 div c fill
} bind def
/arrl 1 def
/arrw 0.3 def
/lrl { 2 index mul exch 2 index mul exch rlineto pop} bind def
/arr { setrgbcolor /y1 exch def /x1 exch def /dy exch def /dx exch def
/w exch def /len exch def
newpath x1 dy w 2 div mul add y1 dx w 2 div mul sub moveto
len w sub arrl sub dx dy lrl
arrw dy dx neg lrl
dx arrl w add mul dy w 2 div arrw add mul sub
dy arrl w add mul dx w 2 div arrw add mul add rlineto
dx arrl w add mul neg dy w 2 div arrw add mul sub
dy arrl w add mul neg dx w 2 div arrw add mul add rlineto
arrw dy dx neg lrl
len w sub arrl sub neg dx dy lrl
closepath fill } bind def
/cshow { 2 index 2 index moveto dup stringwidth pop
neg 2 div fosi .35 mul neg rmoveto show pop pop} def
gsave
100 dup scale
%Arcs:
gsave
0.789474 0.947368 1.21053 0.947368 0 0 0 0.00848528 l
2 0 1.21053 0.947368 0 0 0 0.00848528 l
1 2 1.21053 0.947368 0 0 0 0.00848528 l
1 2 0.789474 0.947368 0 0 0 0.00848528 l
1 2 2 0 0 0 0 0.00848528 l
0 0 0.789474 0.947368 0 0 0 0.00848528 l
0 0 2 0 0 0 0 0.00848528 l
0 0 1 2 0 0 0 0.00848528 l
grestore
%Nodes:
gsave
1.21053 0.947368 0.0282843 1 1 1 nc
0.789474 0.947368 0.0282843 1 1 1 nc
2 0 0.0282843 1 1 1 nc
1 2 0.0282843 1 1 1 nc
0 0 0.0282843 1 1 1 nc
grestore
grestore
showpage
%!PS-Adobe-2.0 EPSF-2.0
%%Creator: LEMON, graphToEps()
%%CreationDate: Thu Dec 5 16:13:00 2019
%%BoundingBox: -108 -94 108 113
%%CreationDate: Sat Dec 14 17:38:42 2019
%%BoundingBox: -361 -310 361 378
%%EndComments
/lb { setlinewidth setrgbcolor newpath moveto
4 2 roll 1 index 1 index curveto stroke } bind def
......@@ -68,46 +68,46 @@ gsave
100 dup scale
%Arcs:
gsave
-0.280883 -0.323493 -0.42839 -0.018524 0 0 0 0.00787469 l
0.173856 -0.141598 -0.280883 -0.323493 0 0 0 0.00787469 l
0.369568 0.240292 0.173856 -0.141598 0 0 0 0.00787469 l
0.33518 0.46834 0.369568 0.240292 0 0 0 0.00787469 l
0.018099 0.325358 -0.42839 -0.018524 0 0 0 0.00787469 l
0.018099 0.325358 0.173856 -0.141598 0 0 0 0.00787469 l
0.018099 0.325358 0.369568 0.240292 0 0 0 0.00787469 l
0.018099 0.325358 0.33518 0.46834 0 0 0 0.00787469 l
-0.33981 0.404089 -0.42839 -0.018524 0 0 0 0.00787469 l
-0.33981 0.404089 0.018099 0.325358 0 0 0 0.00787469 l
-0.951 0.309 -0.42839 -0.018524 0 0 0 0.00787469 l
-0.951 0.309 -0.33981 0.404089 0 0 0 0.00787469 l
-0.587 -0.809 -0.42839 -0.018524 0 0 0 0.00787469 l
-0.587 -0.809 -0.280883 -0.323493 0 0 0 0.00787469 l
-0.587 -0.809 -0.951 0.309 0 0 0 0.00787469 l
0.587 -0.809 0.173856 -0.141598 0 0 0 0.00787469 l
0.587 -0.809 -0.587 -0.809 0 0 0 0.00787469 l
0.951 0.309 0.369568 0.240292 0 0 0 0.00787469 l
0.951 0.309 0.33518 0.46834 0 0 0 0.00787469 l
0.951 0.309 0.587 -0.809 0 0 0 0.00787469 l
0 1 0.33518 0.46834 0 0 0 0.00787469 l
0 1 0.018099 0.325358 0 0 0 0.00787469 l
0 1 -0.33981 0.404089 0 0 0 0.00787469 l
0 1 -0.951 0.309 0 0 0 0.00787469 l
0 1 0.951 0.309 0 0 0 0.00787469 l
0 1.38145 1.2232 0.769845 0 0 0 0.0282263 l
-0.611601 0.158244 0 1.38145 0 0 0 0.0282263 l
-0.611601 -1.67656 -0.611601 0.158244 0 0 0 0.0282263 l
0 -2.28816 -0.611601 -1.67656 0 0 0 0.0282263 l
0.611601 -1.06496 1.2232 0.769845 0 0 0 0.0282263 l
0.611601 -1.06496 -0.611601 0.158244 0 0 0 0.0282263 l
0.611601 -1.06496 -0.611601 -1.67656 0 0 0 0.0282263 l
0.611601 -1.06496 0 -2.28816 0 0 0 0.0282263 l
1.8348 -0.453357 1.2232 0.769845 0 0 0 0.0282263 l
1.8348 -0.453357 0.611601 -1.06496 0 0 0 0.0282263 l
3.40887 1.10761 1.2232 0.769845 0 0 0 0.0282263 l
3.40887 1.10761 1.8348 -0.453357 0 0 0 0.0282263 l
0 3.5843 1.2232 0.769845 0 0 0 0.0282263 l
0 3.5843 0 1.38145 0 0 0 0.0282263 l
0 3.5843 3.40887 1.10761 0 0 0 0.0282263 l
-3.40887 1.10761 -0.611601 0.158244 0 0 0 0.0282263 l
-3.40887 1.10761 0 3.5843 0 0 0 0.0282263 l
-2.1068 -2.89976 -0.611601 -1.67656 0 0 0 0.0282263 l
-2.1068 -2.89976 0 -2.28816 0 0 0 0.0282263 l
-2.1068 -2.89976 -3.40887 1.10761 0 0 0 0.0282263 l
2.1068 -2.89976 0 -2.28816 0 0 0 0.0282263 l
2.1068 -2.89976 0.611601 -1.06496 0 0 0 0.0282263 l
2.1068 -2.89976 1.8348 -0.453357 0 0 0 0.0282263 l
2.1068 -2.89976 3.40887 1.10761 0 0 0 0.0282263 l
2.1068 -2.89976 -2.1068 -2.89976 0 0 0 0.0282263 l
grestore
%Nodes:
gsave
-0.42839 -0.018524 0.026249 1 1 1 nc
-0.280883 -0.323493 0.026249 1 1 1 nc
0.173856 -0.141598 0.026249 1 1 1 nc
0.369568 0.240292 0.026249 1 1 1 nc
0.33518 0.46834 0.026249 1 1 1 nc
0.018099 0.325358 0.026249 1 1 1 nc
-0.33981 0.404089 0.026249 1 1 1 nc
-0.951 0.309 0.026249 1 1 1 nc
-0.587 -0.809 0.026249 1 1 1 nc
0.587 -0.809 0.026249 1 1 1 nc
0.951 0.309 0.026249 1 1 1 nc
0 1 0.026249 1 1 1 nc
1.2232 0.769845 0.0940876 1 1 1 nc
0 1.38145 0.0940876 1 1 1 nc
-0.611601 0.158244 0.0940876 1 1 1 nc
-0.611601 -1.67656 0.0940876 1 1 1 nc
0 -2.28816 0.0940876 1 1 1 nc
0.611601 -1.06496 0.0940876 1 1 1 nc
1.8348 -0.453357 0.0940876 1 1 1 nc
3.40887 1.10761 0.0940876 1 1 1 nc
0 3.5843 0.0940876 1 1 1 nc
-3.40887 1.10761 0.0940876 1 1 1 nc
-2.1068 -2.89976 0.0940876 1 1 1 nc
2.1068 -2.89976 0.0940876 1 1 1 nc
grestore
grestore
showpage
No preview for this file type
......@@ -200,20 +200,13 @@ int main (int argc, const char *argv[]) {
// python output
std::cout << "[";
Graph_t::NodeIt u(graph);
Point_t & p = coordsMap[u];
std::cout << "(" << p.x << ", " << p.y << ")";
for(++u; u != lemon::INVALID; ++u) {
p = coordsMap[u];
std::cout << ", (" << p.x << ", " << p.y << ")";
Point_t & p = coordsMap[graph.nodeFromId(0)];
std::cout << "[" << p.x << ", " << p.y << ", 0]";
for(int i=1; i<n; i++) {
p = coordsMap[graph.nodeFromId(i)];
std::cout << ",[" << p.x << ", " << p.y << ", 0]";
}
std::cout << "]" << std::endl << "[";
Graph_t::EdgeIt e(graph);
std::cout << "(" << graph.id(graph.u(e)) << ", " << graph.id(graph.v(e)) << ")";
for(++e; e != lemon::INVALID; ++e) {
std::cout << ", (" << graph.id(graph.u(e)) << ", " << graph.id(graph.v(e)) << ")";
}
std::cout << "]" << std::endl;
delete solver;
delete solver_builder;
......
......@@ -9,4 +9,3 @@ angle = 2 * math.pi / nb_vertices
for i in range(nb_vertices):
x = center_x + radius * math.sin(i * angle)
y = center_y + radius * math.cos(i * angle)
\ No newline at end of file
print(x, y)
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment