maple_for_3D_pictures.mws

Maple for making 3D pictures

Copyright 2000-2005, SUNY Buffalo.

Parametric space curves:

> plots[spacecurve]([cos(t),sin(t),t/5],t=0..10,
                 color=blue,scaling=constrained,axes=boxed);

[Plot]

Parametric surfaces:

Give plot3d a triple [ , , ], each component depending as desired on your two parameters.
E.g.,

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

              scaling=constrained,lightmodel=light2,axes=boxed);

r := 1-1/4*z^2

[Plot]

Note that the graphic can be twirled in real time using the mouse!

Graphs are a special case of a parametric surface:

> f:=x^2*y/(x^2+y^2);
plot3d( [x,y,f],x=-1..1,y=-1..1,

              lightmodel=light2,axes=boxed,style=patchcontour );

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

[Plot]

plot3d( f,x=-1..1,y=-1..1) also works.

Implicit surfaces can be pictured:

> with(plots):
eqn:= x^2-x*y+2*y^2+4*z*y=1;

implicitplot3d( eqn, x=-2..2,y=-2..2,z=-2..2,

                 scaling=constrained,lightmodel=light2,axes=boxed,

                 style=patchnogrid);

eqn := x^2-x*y+2*y^2+4*z*y = 1

[Plot]

Surfaces given implicitly in cylindrical or spherical coordinates can also be done. Careful with the variable order:
For example in cylindrical mode, it assumes the first variable is "r" (no matter what it's named), the second is "theta",

the third is "z".

> restart:
eqn:= r=cos(z);

plots[implicitplot3d]( eqn, r=0..5,theta=0..2*Pi, z=-1..7,                    coords=cylindrical,

                  scaling=constrained,lightmodel=light2,axes=boxed,

                  style=patchnogrid);

eqn := r = cos(z)

[Plot]

Combining plots

3D pictures can be combined using plots[display] as described in maple_for_pictures.mws.

Graphics primitives

lines, etc. are availablein 3D  as in 2D: see

? plottools

Miscellaneous

Some nice 3D arrows are available in Maple 7.

? arrow

>