Wednesday, December 11, 2019

RotationTransform - Pattern Array Examples


AGRTP[m_,k_,s_,col_]:=Module[{ag},
ag=AdjacencyGraph[ExampleData[
{"Matrix",ExampleData["Matrix"][[m,2]]},"Matrix"]["PatternArray"],
DirectedEdges->False,VertexSize->0];
CS[i_]:=ColorData[col][6Mod[i,Round[k/6]]/k];
RTAG[i_]:=RotationTransform[
2i*Pi/k,{0,0}]/@ResourceFunction["VertexCoordinateList"][ag]//N;
Show[Table[GraphPlot[ag,
VertexCoordinates->RTAG[i],EdgeStyle->CS[i]],{i,k}],ImageSize->s]]
{AGRTP[277,30,300,"CherryTones"],
AGRTP[420,24,300,"CoffeeTones"]}

AGRTP[269,24,600,"CandyColors"]

No comments:

Post a Comment