SageMathとグラフ理論(プラトングラフ)

プラトングラフとは正四面体、正八面体、立方体、正十二面体グラフと正二十面体グラフのことだそうです。


とりあえずSageMathでグラフで表現することができたのでご紹介。

f:id:niming538:20170917150903p:plain

 

# platonic.sage
# plot five platonic graphs.
# attach('platonic.sage')

p1=plot(graphs.TetrahedralGraph())
p2=plot(graphs.OctahedralGraph())
p3=plot(graphs.HexahedralGraph())
p4=plot(graphs.IcosahedralGraph())
p5=plot(graphs.DodecahedralGraph())
p6=plot(Graph())

graphics_array(((p1,p2,p3),(p4,p5,p6)))