Sunday, December 29, 2019

AdjacencyGraph & RotationTransform



AG[m_]:=AdjacencyGraph[ExampleData[{"Matrix",
m},"Matrix"]["PatternArray"],DirectedEdges->False];
RTAG[a_,m_]:=RotationTransform[a,{0,
0}]/@ResourceFunction["VertexCoordinateList"][AG[m]]//N;
RAG[m_,k_,s_,col_]:=Show[Table[GraphPlot[AG[m],
VertexStyle->Transparent,VertexShape->"",
EdgeStyle->ColorData[col][Cos[4Pi*i/k]^2],
PlotStyle->Opacity[.8],
VertexCoordinates->RTAG[2i*Pi/k,m]],
{i,k}],ImageSize->s];
RAG["HB/dwt_1005",18,600,"CherryTones"]
{RAG["HB/bcspwr01",36,300,"Pastel"],
RAG["CAN292",12,300,"CandyColors"]}


No comments:

Post a Comment