definiera en lämplig funktion > f:=(x,y)->((x-0.5)^2*(y^(0.2))+0.4*y^2*x)*exp(-x^2-2*(y-1)^2)*4+1; f := (x, y) -> 2 .2 2 2 2 4 ((x - .5) y + .4 y x) exp(-x - 2 (y - 1) ) + 1 Ladda in grafirutiner > with(plots): with(plottools): Rita 3dbild, nivåkurvor och gradient > p3:=plot3d(f(x,y),x=-2.5..2.5,y=0..2.5,contours=10): > pc:=contourplot(f(x,y),x=-2.5..2.5,y=0..2.5,contours=14): > pgr:=gradplot(f(x,y),x=-2.5..2.5,y=-0.1..2.5,arrows=SLIM): > display([pc,pgr]); För att transformera 2dbilder till 3d > g:=transform((x,y)->[x,y,0]): > display([p3,g(pc)]); > display([p3,g(pgr)]); >