svg(filename='Rplots.svg',width=7,height=7,onefile=TRUE,
pointsize=12,family='times',bg='black',
antialias=c('default','none','gray','subpixel'))
a<-.01*sample(30:99,1); b<-.01*sample(30:99,1)
c<-.01*sample(30:99,1); d<-max(a,2*b,3*c)
t1<-seq(0,8.95*pi,len=36*n)
x1<-sin(1.9*t1)*cos(t1); y1<-sin(1.9*t1)*sin(t1)
t2<-seq(0,12.18*pi,len=36*n)
x2<-2*sin(2.3*t2)*cos(t2); y2<-2*sin(2.3*t2)*sin(t2)
t3<-seq(0,11.77*pi,len=36*n)
x3<-3*sin(1.7*t3)*cos(t3); y3<-3*sin(1.7*t3)*sin(t3)
plot(a*x1,a*y1,type='o',pch=sample(0:18,1),cex=.4,
col=rgb(runif(1),runif(1),runif(1)),
xlim=c(-d,d),ylim=c(-d,d)); par(new=T)
plot(b*x2,b*y2,type='o',pch=sample(0:18,1),cex=.5,
col=rgb(runif(1),runif(1),runif(1)),
xlim=c(-d,d),ylim=c(-d,d)); par(new=T)
plot(c*x3,c*y3,type='o',pch=sample(0:18,1),cex=.6,
col=rgb(runif(1),runif(1),runif(1)),
lwd=1,xlim=c(-d,d),ylim=c(-d,d),
xlab='x',ylab='y',fg='slategray',
col.axis='slategray',col.lab='slategray')
grid(col='slategray'); dev.off()
paste0('a = ',a,'; b = ',b,'; c = ',c,'; n = ',n)
No comments:
Post a Comment