t<-seq(0,600,by=0.001)
r<-0.7
T1<-1
T2<-1*r
w1<-2*pi/T1
w2<-2*pi/T2
theta<-w1*t
phi<-w2*t
r1<-2
r2<-1
x<-r1*cos(theta)+r2*cos(theta)*cos(phi)
y<-r1*sin(theta)+r2*sin(theta)*cos(phi)
z<-r2*sin(phi)
plot3d(x,y,z)
t<-seq(0,600,by=0.001)
T1<-1*sqrt(2)
T2<-1*sqrt(3)
T3<-1*pi
w1<-2*pi/T1
w2<-2*pi/T2
w3<-2*pi/T3
theta<-w1*t
phi<-w2*t
psi<-w3*t
r1<-2
r2<-1
x<-cos(theta)*(1+cos(phi))*(1+cos(psi))
y<-sin(theta)*(1+cos(phi))*(1+cos(psi))
z<- sin(phi)*(1+cos(psi))
w<-sin(psi)
plot3d(y,z,w,col=rainbow(601)[t+1])