You need to draw the line graph at least once so that you get the
positions of the vertices.
load(graphs);
a: from_adjacency_matrix(matrix([0,1,1,1],[1,0,1,0],[1,1,0,1],[1,0,1,0]));
la: line_graph(a);
draw_graph(la, program=planar_embedding)$
pos: get_positions(la)$
draw2d(
polygon(map(lambda([v], assoc(v, pos)), [2,3,4])),
polygon(map(lambda([v], assoc(v, pos)), [0,1,3])));
Andrej
On Thu, Jul 22, 2010 at 5:53 PM, Marco Rofei <marco.rofei at gmail.com> wrote:
>
>
> sublist_indices(edges(a),lambda([e], member(2, e)))-1;
>
> -> [0,1,3].
>
> HTH, Andrej
>
> Ok, perfect.. I understand... and now, how can I color that polygon?
>
> And if I want to run a command that colors polygon [0,1,3] and [2,3,4]
> (vertex 0 in graph)?
>
>
> Thanks for help
> MR