# 媒介変数 t t<-seq(-pi,pi,length=100) X<- 10*cos(t) Y<- 5*sin(t) plot(X, Y, type="l",col="red",lwd = 1,xlim=c(-10,10),ylim=c(-10,10)) par(new=T) X<- 5*cos(t) Y<- 10*sin(t) plot(X, Y, type="l",col="blue",lwd = 1,xlim=c(-10,10),ylim=c(-10,10)) title("Ellipse ") dev.new() t<-seq(-2*pi,2*pi,length=100) X<- t-sin(t) Y<- 1-cos(t) plot(X, Y, type="l",col="red",lwd = 1,xlim=c(-10,10),ylim=c(-10,10)) par(new=T) a=1;b=6; X<- a*t-b*sin(t) Y<- a-b*cos(t) plot(X, Y, type="l",col="blue",lwd = 1,xlim=c(-10,10),ylim=c(-10,10)) abline(h=0,col=8) mtext("a= b= 1 (Cycloid)",3,0,col=2) mtext(paste(" a= ",a," b= ",b),3,0.6,col=4) title("Trochoid") dev.new() t<-seq(-pi,pi,length=100) X<- 5*(cos(t))^2 Y<- 5*(sin(t))^2 plot(X, Y, type="l",col=2,lwd = 1,xlim=c(-6,6),ylim=c(-6,6)) par(new=T) X<- 5*(cos(t))^3 Y<- 5*(sin(t))^3 plot(X, Y, type="l",col=3,lwd = 1,xlim=c(-6,6),ylim=c(-6,6)) par(new=T) X<- 5*(cos(t))^4 Y<- 5*(sin(t))^4 plot(X, Y, type="l",col=4,lwd = 1,xlim=c(-6,6),ylim=c(-6,6)) par(new=T) X<- 5*(cos(t))^5 Y<- 5*(sin(t))^5 plot(X, Y, type="l",col=5,lwd = 1,xlim=c(-6,6),ylim=c(-6,6)) mtext("n = 2, 3, 4, 5",3,0) title(" Asteroid")   dev.new() #polar r<-2*sin(2*t) X<- r*cos(t) Y<- r*sin(t) plot(X, Y, type="l",col="blue",lwd = 1,xlim=c(-2,2),ylim=c(-2,2)) par(new=T) r<-2*cos(3*t) X<- r*cos(t) Y<- r*sin(t) plot(X, Y, type="l",col="red",lwd = 1,xlim=c(-2,2),ylim=c(-2,2)) text(-1,2,"r=2sin(2t)" ,col="blue") text(1,2,"r=2cos(3t)" ,col="red") title("Leaves ") dev.new() r<-cos(t)+1 X<- r*cos(t)-1 Y<- r*sin(t) plot(X, Y, type="l",col="red",lwd = 1,xlim=c(-2,2),ylim=c(-2,2)) par(new=T) r<-2*cos(t)-1 X<- r*cos(t)-1 Y<- r*sin(t) plot(X, Y, type="l",col="blue",lwd = 1,xlim=c(-2,2),ylim=c(-2,2)) text(-1,2,"r=2cos(t)+1" ,col="blue") text(1,2,"r=cos(t)-1" ,col="red") title("Cardioid ")