What packages and functions in R can perform a two dimensional non-additive local regression/smooth. For example consider
b<-seq(-6*pi,6*pi,length=100)
xy<-expand.grid(b,b)
x=xy[[1]]
y=xy[[2]]
z= sin(x)+cos(y) + 2*sin(x)*cos(y)
contour(b,b,matrix(z,100,100))
What functions could estimate this?