MA 105 - KODER FOR MAPLE-FIGURER BRUKT I FORELESNINGENE


26/01

> with(plots):

> f(x,y,z):= x^2 + y^2 - z;

[Maple Math]

> implicitplot3d({f(x,y,z) = 0, f(x,y,z) = 1, f(x,y,z) = -1}, x=-2..2, y=-2..2, z=-1..4);

[Maple Plot]

>


> with(plots):

> f:= y^3 - x^2;

[Maple Math]

> contourplot(f, x=-2..2, y=-1.5..1.5);

[Maple Plot]

> plot3d(f, x=-2..2, y=-1.5..1.5);

[Maple Plot]

>


31/01

> with(plots);

[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]

> f:= 2*x^2*y/(x^4+y^2);

[Maple Math]

> plot3d(f(x,y), x=-0.5..0.5, y=-0.5..0.5, grid=[70,70]);

[Maple Plot]

> contourplot (f(x,y), x=-0.5..0.5, y=-0.5..0.5, grid=[30,30]);

[Maple Plot]

>


02/02

> with(plots):

> f:= exp(-x^2 - y^2);

[Maple Math]

> plot3d(f(x,y), x=-2..2, y=-2..2);

[Maple Plot]

> contourplot(f(x,y), x=-2..2, y=-2..2);

[Maple Plot]

> gradplot(f(x,y), x=-2..2, y=-2..2);

Error, (in plots/fieldplot/arrowsf2d) division by zero

> fieldplot([-2*x*exp(-x^2-y^2), -2*y*exp(-x^2-y^2)], x=-2..2, y=-2..2);

[Maple Plot]

>


07-09/02




16/02


21/02

> with(plots):

> A:= plot3d(sqrt(x*x + y*y), x=-3..2, y=-4..2):

> B:= plot3d(-sqrt(x*x + y*y), x=-3..2, y=-4..2):

> C:= plot3d( (3-x-2*y)/3, x=-3..2, y=-4..2):

> display(A, B, C);

[Maple Plot]

>


28/02



01/03

> with(plots):

> plot3d(1 + x^2 + y^2, x=0..1, y=0..1);

[Maple Plot]

> with(linalg):

Warning, new definition for norm

Warning, new definition for trace

> A:= matrix(4, 4, (i,j) -> 1 + ((2*i - 1)/8)^2 + ((2*j - 1)/8)^2);

[Maple Math]

> matrixplot(A, heights=histogram, style=patch, shading=zgrayscale);

[Maple Plot]

> B:= matrix(8, 8, (i,j) -> 1 + ((2*i - 1)/16)^2 + ((2*j - 1)/16)^2);

[Maple Math]

> matrixplot(B, heights=histogram, style=patch, shading=zgrayscale);

[Maple Plot]

>


06/03

> with(plots):

> A:=plot3d([r*cos(t), r*sin(t), r*r*(1+sin(t)^2)], r=0..2, t=0..2*Pi):

> B:=plot3d([r*cos(t), r*sin(t), 12 - r*r*(1+cos(t)^2)], r=0..2, t=0..2*Pi):

> display(A,B);

[Maple Plot]

>


08/03

> with(plots):

> A:=plot3d([cos(t), sin(t), u], t=0..2*Pi, u=-1.5..1.5):

> B:=plot3d([u, cos(t), sin(t)], t=0..2*Pi, u=-1.5..1.5):

> display(A,B);

[Maple Plot]

>


> with(plots):

> A:=plot3d([u,v,2-u*u], u=-1..1, v=0..3):

> B:=plot3d([u,v,u*u], u=-1..1, v=0..3):

> display(A,B);

[Maple Plot]

>


13/03

> with(plots):

> plot([(1+cos(t))*sin(t), (1+cos(t))*cos(t), t=0..Pi]);

[Maple Plot]

> plot3d([1+cos(phi), theta, phi], theta=0..2*Pi, phi=0..Pi, coords=spherical);

[Maple Plot]

>


20-22/03

> with(plots):

> plot3d([cosh(u)*cos(t),cosh(u)*sin(t)/2,sinh(u)], u=-1..1, t=0..2*Pi);

[Maple Plot]

>


27/03

> with(plots):

> plot3d([r*cos(t), r*sin(t), r*r*sin(2*t)/2], r=0..1, t=0..2*Pi);

[Maple Plot]

>


> with(plots):

> plot3d([4*cos(th)-t*cos(th)*sin(th/2), 4*sin(th)-t*sin(th)*sin(th/2), t*cos(th/2)], th=0..2*Pi, t=-1..1);

[Maple Plot]

> #Møbius-flaten


Sist oppdatert 21 mars 2000 av bratteli@math.uio.no