In[]:=
With[{g=GridGraph[{20,20}]},NeighborhoodGraph[g,GraphCenter[g],6]]
Out[]=
In[]:=
With[{g=GridGraph[{14,14,14}]},NeighborhoodGraph[g,GraphCenter[g],6]]//Graph3D
Out[]=
In[]:=
2Pir
Out[]=
2πr
In[]:=
2Pi/4
Out[]=
π
2
In[]:=
gg=NeighborhoodGraph[GridGraph[{10,10}],56,4];
In[]:=
Graph[gg,VertexLabelsAutomatic]
Out[]=
In[]:=
geodesics=RankedGeodesics[gg,4,{60,56,52}];
In[]:=
geodesics〚12〛
Out[]=
In[]:=
HighlightGraph[gg,Append[Style[Subgraph[gg,FindShortestPath[gg,##]&@@#〚2,1〛],ColorData["TemperatureMap"][#〚1〛/8]]&/@geodesics〚2;;〛,Style[Subgraph[gg,FindShortestPath[gg,##]&@@geodesics〚1,2,1〛],ColorData["TemperatureMap"][0/8]]]]
Out[]=
In[]:=
geodesics
In[]:=
RankedGeodesics
,4,{60,56,52}
Out[]=