(*n階展開式*) n=3; poscor=1; pos[nl_List]:={{2nl[[1]], nl[[2]]+{-1/5,-1/5}/2^poscor},{2nl[[1]]+1,nl[[2]]+{1/5,-1/5}/2^poscor}}
data=Flatten[NestList[(poscor+=1;Flatten[Map[pos,#],1])&,{{1,{1,1}}},n],1];
diff=Flatten[NestList[Flatten[Map[{{#[[1,2]]->ToString[#[[1,2]]]<>"x"},{#[[1,2]]->ToString[#[[1,2]]]<>"y"}}&,#],1]&,{{f->f}},n]]
GraphPlot[Rule@@@diff[[2;;-1]],VertexLabeling->All, VertexCoordinateRules->Thread[diff[[All,2]]->data[[All,2]]], ImageSize->600] 簡單一點的方法就用TrrPlot
TreePlot[diff[[2 ;; -1]], VertexLabeling -> True]
讀者回應 ( 0 意見 )
訂閱發佈留言 (Atom)
發佈留言
Please leave your name and tell me what you thought about this site. Comments, suggestions and views are welcomed.
如果這篇文章對你有幫助,那請留個訊息給我~