dear All can anybody point me in to the right direction for this kind of operation?? Here an example. Please consider an hilly matematical landscapa as i<-10000 X<- runif(i, min=0, max=4*pi) Y<- runif(i, min=0, max=4*pi) Z<-(cos(X)+cos(Y))/2 plot(X,Y,xlim=c(0,4*pi),ylim=c(0,4*pi), xlab="X",ylab="Y", main=c(i," points")) coscos.spl<-interp.new(X,Y ,Z,xo=seq(0,4*pi,length=100),yo=seq(0,4*pi,length=100)) contour(coscos.spl,add=T,col="blue",levels=c(seq(-1,1,1/5)),labcex=0.8) in this case contour plot derived from 10000 points interpolated rappresent very welll real trend. now consider par(mfrow=c(4,5) ) for (i in seq(5,195,10)) { X<- runif(i, min=0, max=4*pi) Y<- runif(i, min=0, max=4*pi) Z<-(cos(X)+cos(Y))/2 plot(X,Y,xlim=c(0,4*pi),ylim=c(0,4*pi), xlab="X",ylab="Y", main=c(i," points")) coscos.spl<-interp.new(X,Y ,Z,xo=seq(0,4*pi,length=100),yo=seq(0,4*pi,length=100)) contour(coscos.spl,add=T,col="blue",levels=c(seq(-1,1,1/5)),labcex=0.8) } How many points are necessary to fit (at 95% c.i.) true surface??? 85 points??? or more than 200??? tnx in advance!! ------------------------------------------------------------------------------------------------------------------------- Landini Massimiliano ------------------------------------------------------------------------------------------------------------------------- Legge di Hanggi: Pi? stupida ? la tua ricerca, pi? verr? letta e approvata. Corollario alla Legge di Hanggi: Pi? importante ? la tua ricerca, meno verr? capita.