;This script creates a plane and applies the function sin(x^2+y^2) to it ;init set(onlinecalc,t) set(complete,f) ;parameters buffer=2 xmin:=-50 xmax:=50 ymin:=-50 ymax:=50 z:=0 xsect:=10 ysect:=10 ;doit xstep=(xmax-xmin)/(xsect-1) ystep=(ymax-ymin)/(ysect-1) for(i,0,xsect-2) x1=xmin+i*xstep x2=x1+xstep for(j,0,ysect-2) y1=ymin+j*ystep y2=y1+ystep addface(buffer,x1,y1,z,x2,y1,z,x2,y2,z) addface(buffer,x1,y1,z,x1,y2,z,x2,y2,z) end end ;only for Imagine-users merge(buffer) ;show the result set(rotx,138) set(rotz,330) set(zoom,1.2) window(buffer) ;plot the function func(2,30*sin((x0*x0+y0*y0)/25),0,z)