
library(lattice)
n<-50
tx<-matrix(seq(-pi,pi,len=2*n),2*n,n)
ty<-matrix(seq(-pi,pi,len=n)/2,2*n,n,byrow=T)
xx<-cos(tx)*cos(ty)
yy<-sin(tx)*cos(ty)
zz<-sin(ty)
zzz[,1:12*4]<-NA
wireframe(zzz~xx*yy,shade=TRUE,light.source=c(3,3,3))

library(lattice)
n<-50
tx<-matrix(seq(-pi,pi,len=2*n),2*n,n)
ty<-matrix(seq(-pi,pi,len=n)/2,2*n,n,byrow=T)
xx<-cos(tx)*cos(ty)
yy<-sin(tx)*cos(ty)
zz<-sin(ty)
zzz[,1:12*4]<-NA
wireframe(zzz~xx*yy,shade=TRUE,light.source=c(3,3,3))
发表评论