Din.grafo = function (X,f,r=2, cex=0.5,lwd=0.3,punta=0.2) {n=length(X); t=seq(0,length=n,by=2*pi/n); centri=round(Gf.cerchio(t,r),2) t=seq(0,2*pi,by=0.01) cerchio=Gf.cerchio(t,0.2) for (k in 1:n) {polygon(cerchio+centri[k],col="yellow"); text(Re(centri[k]),Im(centri[k]), X[k],cex=cex)} par(lwd=lwd) for (x in X) {y=f(x); if (y!=x) R=Gdf.mezzo(centri[match(x,X)], centri[match(y,X)], punta=punta,d1=0.2,d2=0.2)}} X=c(4,6,7,8,2,5,1,3) f = function (x) P.quale(x,1,3,2,8,3,3,4,7, 5,1,6,7,7,8,8,3) Gs.postscript("06-dingrafo-2.ps",4.8,4.8) lato=c(-2.4,2.4); par(bg="#ccff99") Gd.grafica(lato,lato,cornice=T) Din.grafo(X,f) dev.off()