上半身的(之前某个大侠的code):
require('rgl')
a1<-seq(0,2,0.01)
b1<-seq(0,1,0.01)
f<-function(a1,b1) ifelse(a1<=1, 11*a1*log10(a1)*b1*(b1-1)+exp(-((25*a1-25/exp(1))^2+(25*b1-25/2)^2)^3)/25, 11*(a1-1)*log10(abs(a1-1))*b1*(b1-1)+exp(-((25*(a1-1)-25/exp(1))^2+(25*b1-25/2)^2)^3)/25)
c1<-outer(a1,b1,f)
open3d()
persp3d(a1,b1,c1,theta=30,phi=30,expand=0.5,col="lightyellow")
|