# HG changeset patch
# User Nathann Cohen <nathann.cohen@gmail.com>
# Date 1306603098 7200
# Node ID 9bd2029f204a3994dbda7002614ce1e325b4bb7e
# Parent f8bdf65336cfdc59771dca5141e5b96d72c1d57b
trac 11397  An embedding for the Icosahedron
diff r f8bdf65336cf r 9bd2029f204a sage/graphs/graph_generators.py
a

b


2101  2101  """ 
2102  2102  import networkx 
2103  2103  G = networkx.icosahedral_graph() 
2104   return graph.Graph(G, name="Icosahedron") 
 2104  
 2105  pos = {} 
 2106  r1 = 5 
 2107  r2 = 2 
 2108  for i,v in enumerate([2,8,7,11,4,6]): 
 2109  i = i + .5 
 2110  pos[v] = (r1*cos(i*pi/3),r1*sin(i*pi/3)) 
 2111  
 2112  for i,v in enumerate([1,9,0,10,5,3]): 
 2113  i = i + .5 
 2114  pos[v] = (r2*cos(i*pi/3),r2*sin(i*pi/3)) 
 2115  
 2116  return graph.Graph(G, name="Icosahedron", pos = pos) 
2105  2117  
2106  2118  def DodecahedralGraph(self): 
2107  2119  """ 